Mercurial > emacs
annotate lisp/gnus/message.el @ 107177:0d0660dbdea4
Fix handling of CODING_RESULT_INSUFFICIENT_DST.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 18 Feb 2010 11:32:37 +0900 |
parents | 6a11e3b311d8 |
children | a41886cf3890 |
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, |
106815 | 4 ;; 2005, 2006, 2007, 2008, 2009, 2010 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 | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94209
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
17493 | 12 ;; it under the terms of the GNU General Public License as published by |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94209
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94209
diff
changeset
|
14 ;; (at your option) any later version. |
17493 | 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 | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94209
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17493 | 19 ;; GNU General Public License for more details. |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94209
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
17493 | 23 |
24 ;;; Commentary: | |
25 | |
26 ;; This mode provides mail-sending facilities from within Emacs. It | |
27 ;; consists mainly of large chunks of code from the sendmail.el, | |
28 ;; gnus-msg.el and rnewspost.el files. | |
29 | |
30 ;;; Code: | |
31 | |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
32 (eval-and-compile |
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
33 (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
|
34 (eval-when-compile |
86154 | 35 (require 'cl)) |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
36 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
37 (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
|
38 (require 'canlock) |
17493 | 39 (require 'mailheader) |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
40 (require 'gmm-utils) |
17493 | 41 (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
|
42 ;; 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
|
43 ;; 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
|
44 ;; require mailabbrev here. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
45 (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
|
46 (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
|
47 (require 'mailabbrev)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
48 (require 'mail-parse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
49 (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
|
50 (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
|
51 (require 'ecomplete) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
52 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
53 (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
|
54 |
86154 | 55 (defvar gnus-message-group-art) |
56 (defvar gnus-list-identifiers) ; gnus-sum is required where necessary | |
57 (defvar rmail-enable-mime-composing) | |
17493 | 58 |
59 (defgroup message '((user-mail-address custom-variable) | |
60 (user-full-name custom-variable)) | |
61 "Mail and news message composing." | |
62 :link '(custom-manual "(message)Top") | |
63 :group 'mail | |
64 :group 'news) | |
65 | |
66 (put 'user-mail-address 'custom-type 'string) | |
67 (put 'user-full-name 'custom-type 'string) | |
68 | |
69 (defgroup message-various nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
70 "Various Message Variables." |
17493 | 71 :link '(custom-manual "(message)Various Message Variables") |
72 :group 'message) | |
73 | |
74 (defgroup message-buffers nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
75 "Message Buffers." |
17493 | 76 :link '(custom-manual "(message)Message Buffers") |
77 :group 'message) | |
78 | |
79 (defgroup message-sending nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
80 "Message Sending." |
17493 | 81 :link '(custom-manual "(message)Sending Variables") |
82 :group 'message) | |
83 | |
84 (defgroup message-interface nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
85 "Message Interface." |
17493 | 86 :link '(custom-manual "(message)Interface") |
87 :group 'message) | |
88 | |
89 (defgroup message-forwarding nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
90 "Message Forwarding." |
17493 | 91 :link '(custom-manual "(message)Forwarding") |
92 :group 'message-interface) | |
93 | |
94 (defgroup message-insertion nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
95 "Message Insertion." |
17493 | 96 :link '(custom-manual "(message)Insertion") |
97 :group 'message) | |
98 | |
99 (defgroup message-headers nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
100 "Message Headers." |
17493 | 101 :link '(custom-manual "(message)Message Headers") |
102 :group 'message) | |
103 | |
104 (defgroup message-news nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
105 "Composing News Messages." |
17493 | 106 :group 'message) |
107 | |
108 (defgroup message-mail nil | |
63977
093115a435b2
(message-various, message-buffers, message-sending, message-interface,
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
109 "Composing Mail Messages." |
17493 | 110 :group 'message) |
111 | |
112 (defgroup message-faces nil | |
113 "Faces used for message composing." | |
114 :group 'message | |
115 :group 'faces) | |
116 | |
117 (defcustom message-directory "~/Mail/" | |
118 "*Directory from which all other mail file variables are derived." | |
119 :group 'message-various | |
120 :type 'directory) | |
121 | |
122 (defcustom message-max-buffers 10 | |
123 "*How many buffers to keep before starting to kill them off." | |
124 :group 'message-buffers | |
125 :type 'integer) | |
126 | |
127 (defcustom message-send-rename-function nil | |
128 "Function called to rename the buffer after sending it." | |
129 :group 'message-buffers | |
35147 | 130 :type '(choice function (const nil))) |
17493 | 131 |
132 (defcustom message-fcc-handler-function 'message-output | |
133 "*A function called to save outgoing articles. | |
134 This function will be called with the name of the file to store the | |
135 article in. The default function is `message-output' which saves in Unix | |
136 mailbox format." | |
137 :type '(radio (function-item message-output) | |
138 (function :tag "Other")) | |
139 :group 'message-sending) | |
140 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
141 (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
|
142 "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
|
143 :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
|
144 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
145 :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
|
146 |
17493 | 147 (defcustom message-courtesy-message |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
148 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" |
17493 | 149 "*This is inserted at the start of a mailed copy of a posted message. |
150 If the string contains the format spec \"%s\", the Newsgroups | |
151 the article has been posted to will be inserted there. | |
152 If this variable is nil, no such courtesy message will be added." | |
153 :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
|
154 :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
|
155 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
156 (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
|
157 "^\\(Received\\|Return-Path\\|Delivered-To\\):" |
17493 | 158 "*Regexp that matches headers to be removed in resent bounced mail." |
159 :group 'message-interface | |
160 :type 'regexp) | |
161 | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
162 (defcustom message-from-style mail-from-style |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
163 ;; Default to the value of `mail-from-style', available in all Emacsen |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
164 ;; that Gnus supports. |
17493 | 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." | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
176 :version "23.2" |
17493 | 177 :type '(choice (const :tag "simple" nil) |
178 (const parens) | |
179 (const angles) | |
180 (const default)) | |
181 :group 'message-headers) | |
182 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
183 (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
|
184 "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
|
185 :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
|
186 :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
|
187 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
188 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
189 (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
|
190 (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
|
191 ;; 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
|
192 "*Controls what syntax checks should not be performed on outgoing posts. |
17493 | 193 To disable checking of long signatures, for instance, add |
194 `(signature . disabled)' to this list. | |
195 | |
196 Don't touch this variable unless you really know what you're doing. | |
197 | |
85809 | 198 Checks include `approved', `bogus-recipient', `continuation-headers', |
199 `control-chars', `empty', `existing-newsgroups', `from', `illegible-text', | |
71379 | 200 `invisible-text', `long-header-lines', `long-lines', `message-id', |
201 `multiple-headers', `new-text', `newsgroups', `quoting-style', | |
71398 | 202 `repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot', |
71379 | 203 `shorten-followup-to', `signature', `size', `subject', `subject-cmsg' |
204 and `valid-newsgroups'." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
205 :group 'message-news |
35147 | 206 :type '(repeat sexp)) ; Fixme: improve this |
17493 | 207 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
208 (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
|
209 From) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
210 "*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
|
211 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
|
212 `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
|
213 :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
|
214 :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
|
215 :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
|
216 :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
|
217 :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
|
218 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
219 (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
|
220 "*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
|
221 :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
|
222 :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
|
223 :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
|
224 :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
|
225 :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
|
226 |
17493 | 227 (defcustom message-required-news-headers |
228 '(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
|
229 (optional . Organization) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
230 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
231 "*Headers to be generated or prompted for when posting an article. |
17493 | 232 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, |
233 Message-ID. Organization, Lines, In-Reply-To, Expires, and | |
76650 | 234 User-Agent are optional. If you don't want message to insert some |
17493 | 235 header, remove it from this list." |
236 :group 'message-news | |
237 :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
|
238 :link '(custom-manual "(message)Message Headers") |
17493 | 239 :type '(repeat sexp)) |
240 | |
241 (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
|
242 '(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
|
243 (optional . User-Agent)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
244 "*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
|
245 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
|
246 included. Organization and User-Agent are optional." |
17493 | 247 :group 'message-mail |
248 :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
|
249 :link '(custom-manual "(message)Message Headers") |
17493 | 250 :type '(repeat sexp)) |
251 | |
252 (defcustom message-deletable-headers '(Message-ID Date Lines) | |
253 "Headers to be deleted if they already exist and were generated by message previously." | |
254 :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
|
255 :link '(custom-manual "(message)Message Headers") |
17493 | 256 :type 'sexp) |
257 | |
258 (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
|
259 "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 260 "*Regexp of headers to be removed unconditionally before posting." |
261 :group 'message-news | |
262 :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
|
263 :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
|
264 :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
|
265 (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
|
266 :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
|
267 (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
|
268 (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
|
269 regexp)) |
17493 | 270 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
271 (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
|
272 "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" |
17493 | 273 "*Regexp of headers to be removed unconditionally before mailing." |
274 :group 'message-mail | |
275 :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
|
276 :link '(custom-manual "(message)Mail Headers") |
17493 | 277 :type 'regexp) |
278 | |
87097 | 279 (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 | 280 "*Header lines matching this regexp will be deleted before posting. |
281 It's best to delete old Path and Date headers before posting to avoid | |
282 any confusion." | |
283 :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
|
284 :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
|
285 :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
|
286 (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
|
287 :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
|
288 (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
|
289 (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
|
290 regexp)) |
17493 | 291 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
292 (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
|
293 "^[ \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
|
294 "*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
|
295 :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
|
296 :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
|
297 :type 'regexp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
298 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
299 ;;; 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
|
300 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
301 (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
|
302 "*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
|
303 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
|
304 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
|
305 `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
|
306 `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
|
307 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
|
308 used." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
309 :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
|
310 :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
|
311 (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
|
312 (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
|
313 :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
|
314 :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
|
315 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
316 (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
|
317 "[ \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
|
318 "*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
|
319 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
320 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
|
321 `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
|
322 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
|
323 `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
|
324 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
325 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
|
326 :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
|
327 :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
|
328 :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
|
329 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
330 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
331 (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
|
332 "[ \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
|
333 "*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
|
334 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
335 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
|
336 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
|
337 `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
|
338 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
|
339 :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
|
340 :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
|
341 :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
|
342 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
343 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
344 ;;; 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
|
345 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
346 (defcustom message-mark-insert-begin |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
347 "--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
|
348 "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
|
349 :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
|
350 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
351 :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
|
352 :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
|
353 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
354 (defcustom message-mark-insert-end |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
355 "--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
|
356 "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
|
357 :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
|
358 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
359 :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
|
360 :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
|
361 |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
362 (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
|
363 "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
|
364 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
|
365 :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
|
366 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
367 :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
|
368 :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
|
369 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
370 (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
|
371 "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
|
372 "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
|
373 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
|
374 :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
|
375 :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
|
376 :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
|
377 :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
|
378 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
379 ;;; 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
|
380 ;; 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
|
381 ;; 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
|
382 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
383 (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
|
384 "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
|
385 (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
|
386 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
387 (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
|
388 "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
|
389 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
|
390 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
|
391 `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
|
392 :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
|
393 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
394 :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
|
395 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
396 (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
|
397 "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
|
398 :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
|
399 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
400 :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
|
401 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
402 (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
|
403 "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
|
404 :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
|
405 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
406 :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
|
407 |
60390
d8ddb2b48062
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155
Miles Bader <miles@gnu.org>
parents:
60356
diff
changeset
|
408 (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
|
409 "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
|
410 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
|
411 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
|
412 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
|
413 :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
|
414 :type 'function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
415 :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
|
416 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
417 ;;; 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
|
418 |
93386 | 419 (defcustom message-signature-separator "^-- $" |
420 "Regexp matching the signature separator. | |
421 This variable is used to strip off the signature from quoted text | |
422 when `message-cite-function' is | |
423 `message-cite-original-without-signature'. Most useful values | |
424 are \"^-- $\" (strict) and \"^-- *$\" (loose; allow missing | |
425 whitespace)." | |
426 :type '(choice (const :tag "strict" "^-- $") | |
427 (const :tag "loose" "^-- *$") | |
428 regexp) | |
94209 | 429 :version "22.3" ;; Gnus 5.10.12 (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
|
430 :link '(custom-manual "(message)Various Message Variables") |
17493 | 431 :group 'message-various) |
432 | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
433 (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
|
434 "*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
|
435 :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
|
436 :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
|
437 :group 'message-various) |
17493 | 438 |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
439 (defcustom message-interactive mail-interactive |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
440 ;; Default to the value of `mail-interactive', available in all Emacsen |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
441 ;; that Gnus supports. |
17493 | 442 "Non-nil means when sending a message wait for and display errors. |
443 nil means let mailer mail back a message to report errors." | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
444 :version "23.2" |
17493 | 445 :group 'message-sending |
446 :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
|
447 :link '(custom-manual "(message)Sending Variables") |
17493 | 448 :type 'boolean) |
449 | |
97972 | 450 (defcustom message-confirm-send nil |
98345 | 451 "When non-nil, ask for confirmation when sending a message." |
97972 | 452 :group 'message-sending |
453 :group 'message-mail | |
98398 | 454 :version "23.1" ;; No Gnus |
97972 | 455 :link '(custom-manual "(message)Sending Variables") |
456 :type 'boolean) | |
457 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
458 (defcustom message-generate-new-buffers 'unique |
76650 | 459 "*Say whether to create a new message buffer to compose a message. |
460 Valid values include: | |
461 | |
462 nil | |
463 Generate the buffer name in the Message way (e.g., *mail*, *news*, | |
464 *mail to whom*, *news on group*, etc.) and continue editing in the | |
465 existing buffer of that name. If there is no such buffer, it will | |
466 be newly created. | |
467 | |
468 `unique' or t | |
469 Create the new buffer with the name generated in the Message way. | |
470 | |
471 `unsent' | |
472 Similar to `unique' but the buffer name begins with \"*unsent \". | |
473 | |
474 `standard' | |
475 Similar to nil but the buffer name is simpler like *mail message*. | |
476 | |
477 function | |
478 If this is a function, call that function with three parameters: | |
479 The type, the To address and the group name (any of these may be nil). | |
480 The function should return the new buffer name." | |
17493 | 481 :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
|
482 :link '(custom-manual "(message)Message Buffers") |
76650 | 483 :type '(choice (const nil) |
484 (sexp :tag "unique" :format "unique\n" :value unique | |
485 :match (lambda (widget value) (memq value '(unique t)))) | |
486 (const unsent) | |
487 (const standard) | |
488 (function :format "\n %{%t%}: %v"))) | |
17493 | 489 |
490 (defcustom message-kill-buffer-on-exit nil | |
491 "*Non-nil means that the message buffer will be killed after sending a message." | |
492 :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
|
493 :link '(custom-manual "(message)Message Buffers") |
17493 | 494 :type 'boolean) |
495 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
496 (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
|
497 "*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
|
498 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
|
499 :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
|
500 :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
|
501 :type 'boolean) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
502 |
86154 | 503 (defvar gnus-local-organization) |
17493 | 504 (defcustom message-user-organization |
505 (or (and (boundp 'gnus-local-organization) | |
506 (stringp gnus-local-organization) | |
507 gnus-local-organization) | |
508 (getenv "ORGANIZATION") | |
509 t) | |
510 "*String to be used as an Organization header. | |
511 If t, use `message-user-organization-file'." | |
512 :group 'message-headers | |
513 :type '(choice string | |
514 (const :tag "consult file" t))) | |
515 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
516 (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
|
517 (let (orgfile) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
518 (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
|
519 "/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
|
520 "/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
|
521 (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
|
522 (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
|
523 orgfile) |
17493 | 524 "*Local news organization file." |
525 :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
|
526 :link '(custom-manual "(message)News Headers") |
17493 | 527 :group 'message-headers) |
528 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
529 (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
|
530 #'message-forward-subject-name-subject |
35147 | 531 "*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
|
532 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
|
533 successive function. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
534 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
535 The provided functions are: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
536 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
537 * `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
|
538 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
|
539 * `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
|
540 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
|
541 * `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
|
542 to it." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
543 :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
|
544 :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
|
545 :type '(radio (function-item message-forward-subject-author-subject) |
35147 | 546 (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
|
547 (function-item message-forward-subject-name-subject) |
35147 | 548 (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
|
549 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
550 (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
|
551 "*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
|
552 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
|
553 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
554 :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
|
555 :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
|
556 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
557 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
558 (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
|
559 "*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
|
560 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
|
561 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
|
562 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
|
563 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
|
564 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
|
565 digital signature." |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
566 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
567 :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
|
568 :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
|
569 (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
|
570 (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
|
571 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
572 (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
|
573 "*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
|
574 :group 'message-forwarding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
575 :type 'boolean) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
576 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
577 (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
|
578 "*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
|
579 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
|
580 :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
|
581 :link '(custom-manual "(message)Forwarding") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
582 :type 'boolean) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
583 |
92754
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
584 (defcustom message-ignored-resent-headers |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
585 ;; `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
|
586 ;; 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
|
587 ;; 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
|
588 ;; 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
|
589 ;; bounced with a "mailing loop" error). |
6984a176570c
(message-ignored-resent-headers): Add "Delivered-To".
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92694
diff
changeset
|
590 "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From \\|^Delivered-To:" |
17493 | 591 "*All headers that match this regexp will be deleted when resending a message." |
592 :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
|
593 :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
|
594 :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
|
595 (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
|
596 :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
|
597 (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
|
598 (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
|
599 regexp)) |
17493 | 600 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
601 (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
|
602 "*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
|
603 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
604 :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
|
605 :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
|
606 (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
|
607 :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
|
608 (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
|
609 (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
|
610 regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
611 |
17493 | 612 (defcustom message-ignored-cited-headers "." |
613 "*Delete these headers from the messages you yank." | |
614 :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
|
615 :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
|
616 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
617 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
618 (defcustom message-cite-prefix-regexp |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
619 ;; Default to the value of `mail-citation-prefix-regexp' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
620 ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
621 ;; unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
622 (cond ((boundp 'mail-citation-prefix-regexp) |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
623 mail-citation-prefix-regexp) |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
624 ((string-match "[[:digit:]]" "1") |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
625 ;; Support POSIX? XEmacs 21.5.27 doesn't. |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
626 "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|}]\\)+") |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
627 (t |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
628 ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
629 (let (non-word-constituents) |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
630 (with-syntax-table text-mode-syntax-table |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
631 (setq non-word-constituents |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
632 (concat |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
633 (if (string-match "\\w" "_") "" "_") |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
634 (if (string-match "\\w" ".") "" ".")))) |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
635 (if (equal non-word-constituents "") |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
636 "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}]\\)+" |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
637 (concat "\\([ \t]*\\(\\w\\|[" |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
638 non-word-constituents |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
639 "]\\)+>+\\|[ \t]*[]>|}]\\)+"))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
640 "*Regexp matching the longest possible citation prefix on a line." |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
641 :version "23.2" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
642 :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
|
643 :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
|
644 :type 'regexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
645 :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
|
646 (prog1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
647 (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
|
648 (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
|
649 (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
|
650 (concat "^\\(?:" value "\\)")))))) |
17493 | 651 |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
652 (defcustom message-cancel-message "I am canceling my own article.\n" |
17493 | 653 "Message to be inserted in the cancel message." |
654 :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
|
655 :link '(custom-manual "(message)Canceling News") |
17493 | 656 :type 'string) |
657 | |
86257
99cb1a203e08
defvar smtpmail-default-smtp-server.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86256
diff
changeset
|
658 (defvar smtpmail-default-smtp-server) |
99cb1a203e08
defvar smtpmail-default-smtp-server.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86256
diff
changeset
|
659 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
660 (defun message-send-mail-function () |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
661 "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
|
662 (cond ((and (require 'sendmail) |
b284b075c181
(message-send-mail-function): Require sendmail.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86257
diff
changeset
|
663 (boundp 'sendmail-program) |
b284b075c181
(message-send-mail-function): Require sendmail.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86257
diff
changeset
|
664 sendmail-program |
86256
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
665 (executable-find sendmail-program)) |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
666 '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
|
667 ((and (locate-library "smtpmail") |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
668 (require 'smtpmail) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
669 smtpmail-default-smtp-server) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
670 'message-smtpmail-send-it) |
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
671 ((locate-library "mailclient") |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
672 'message-send-mail-with-mailclient) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
673 (t |
86256
b53cbc241b6f
(message-send-mail-function): Check for smtpmail too.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86254
diff
changeset
|
674 (lambda () |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
675 (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
|
676 |
17493 | 677 ;; 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
|
678 (defcustom message-send-mail-function (message-send-mail-function) |
17493 | 679 "Function to call to send the current buffer as mail. |
680 The headers should be delimited by a line whose contents match the | |
681 variable `mail-header-separator'. | |
682 | |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
683 Valid values include `message-send-mail-with-sendmail' |
35147 | 684 `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
|
685 `message-smtpmail-send-it', `smtpmail-send-it', |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
686 `feedmail-send-it' and `message-send-mail-with-mailclient'. The |
92694 | 687 default is system dependent and determined by the function |
688 `message-send-mail-function'. | |
35147 | 689 |
690 See also `send-mail-function'." | |
17493 | 691 :type '(radio (function-item message-send-mail-with-sendmail) |
692 (function-item message-send-mail-with-mh) | |
693 (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
|
694 (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
|
695 (function-item smtpmail-send-it) |
35147 | 696 (function-item feedmail-send-it) |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
697 (function-item message-send-mail-with-mailclient |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
698 :tag "Use Mailclient package") |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
699 (function :tag "Other")) |
17493 | 700 :group 'message-sending |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
701 :version "23.1" ;; No Gnus |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
702 :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
|
703 :link '(custom-manual "(message)Mail Variables") |
17493 | 704 :group 'message-mail) |
705 | |
706 (defcustom message-send-news-function 'message-send-news | |
707 "Function to call to send the current buffer as news. | |
708 The headers should be delimited by a line whose contents match the | |
709 variable `mail-header-separator'." | |
710 :group 'message-sending | |
711 :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
|
712 :link '(custom-manual "(message)News Variables") |
17493 | 713 :type 'function) |
714 | |
715 (defcustom message-reply-to-function nil | |
35147 | 716 "If non-nil, function that should return a list of headers. |
17493 | 717 This function should pick out addresses from the To, Cc, and From headers |
718 and respond with new To and Cc headers." | |
719 :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
|
720 :link '(custom-manual "(message)Reply") |
35147 | 721 :type '(choice function (const nil))) |
17493 | 722 |
723 (defcustom message-wide-reply-to-function nil | |
35147 | 724 "If non-nil, function that should return a list of headers. |
17493 | 725 This function should pick out addresses from the To, Cc, and From headers |
726 and respond with new To and Cc headers." | |
727 :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
|
728 :link '(custom-manual "(message)Wide Reply") |
35147 | 729 :type '(choice function (const nil))) |
17493 | 730 |
731 (defcustom message-followup-to-function nil | |
35147 | 732 "If non-nil, function that should return a list of headers. |
17493 | 733 This function should pick out addresses from the To, Cc, and From headers |
734 and respond with new To and Cc headers." | |
735 :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
|
736 :link '(custom-manual "(message)Followup") |
35147 | 737 :type '(choice function (const nil))) |
17493 | 738 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
739 (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
|
740 "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
|
741 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
|
742 :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
|
743 :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
|
744 |
17493 | 745 (defcustom message-use-followup-to 'ask |
746 "*Specifies what to do with Followup-To header. | |
747 If nil, always ignore the header. If it is t, use its value, but | |
748 query before using the \"poster\" value. If it is the symbol `ask', | |
749 always query the user whether to use the value. If it is the symbol | |
750 `use', always use the value." | |
751 :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
|
752 :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
|
753 :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
|
754 (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
|
755 (const use) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
756 (const ask))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
757 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
758 (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
|
759 "*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
|
760 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
|
761 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
|
762 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
|
763 :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
|
764 :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
|
765 :link '(custom-manual "(message)Mailing Lists") |
17493 | 766 :type '(choice (const :tag "ignore" nil) |
767 (const use) | |
768 (const ask))) | |
769 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
770 (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
|
771 "*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
|
772 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
|
773 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
|
774 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
|
775 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
|
776 `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
|
777 :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
|
778 :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
|
779 :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
|
780 :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
|
781 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
782 (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
|
783 "*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
|
784 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
|
785 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
|
786 :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
|
787 :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
|
788 :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
|
789 :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
|
790 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
791 (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
|
792 "*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
|
793 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
|
794 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
|
795 `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
|
796 :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
|
797 :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
|
798 :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
|
799 :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
|
800 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
801 (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
|
802 "*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
|
803 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
|
804 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
|
805 `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
|
806 :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
|
807 :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
|
808 :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
|
809 :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
|
810 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
811 (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
|
812 "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
|
813 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
|
814 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
|
815 `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
|
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 :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
|
818 :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
|
819 :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
|
820 (const never) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
821 (const ask))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
822 |
17493 | 823 (defcustom message-sendmail-f-is-evil nil |
35147 | 824 "*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
|
825 Doing so would be even more evil than leaving it out." |
17493 | 826 :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
|
827 :link '(custom-manual "(message)Mail Variables") |
17493 | 828 :type 'boolean) |
829 | |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
830 (defcustom message-sendmail-envelope-from |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
831 ;; Default to the value of `mail-envelope-from' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
832 ;; Note: as for Emacsen that Gnus supports, except for SXEmacs, it is |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
833 ;; unavailable unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
834 (if (boundp 'mail-envelope-from) mail-envelope-from) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
835 "*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
|
836 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
|
837 `header', use the From: header of the message." |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
838 :version "23.2" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
839 :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
|
840 (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
|
841 (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
|
842 :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
|
843 :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
|
844 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
845 (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
|
846 "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
|
847 ;; 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
|
848 :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
|
849 :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
|
850 ;; :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
|
851 :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
|
852 |
17493 | 853 ;; qmail-related stuff |
854 (defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject" | |
855 "Location of the qmail-inject program." | |
856 :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
|
857 :link '(custom-manual "(message)Mail Variables") |
17493 | 858 :type 'file) |
859 | |
860 (defcustom message-qmail-inject-args nil | |
861 "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
|
862 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
|
863 may also be a function. |
17493 | 864 |
865 For e.g., if you wish to set the envelope sender address so that bounces | |
866 go to the right place or to deal with listserv's usage of that address, you | |
867 might set this variable to '(\"-f\" \"you@some.where\")." | |
868 :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
|
869 :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
|
870 :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
|
871 (repeat string))) |
17493 | 872 |
86154 | 873 (defvar gnus-post-method) |
874 (defvar gnus-select-method) | |
17493 | 875 (defcustom message-post-method |
876 (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
|
877 (listp gnus-post-method) |
17493 | 878 gnus-post-method) |
879 gnus-post-method) | |
880 ((boundp 'gnus-select-method) | |
881 gnus-select-method) | |
882 (t '(nnspool ""))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
883 "*Method used to post news. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
884 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
|
885 variable isn't used." |
17493 | 886 :group 'message-news |
887 :group 'message-sending | |
888 ;; This should be the `gnus-select-method' widget, but that might | |
889 ;; create a dependence to `gnus.el'. | |
890 :type 'sexp) | |
891 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
892 ;; 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
|
893 ;; 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
|
894 ;; 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
|
895 ;; 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
|
896 (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
|
897 "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
|
898 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
|
899 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
|
900 `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
|
901 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
902 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
|
903 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
|
904 will not have a visible effect for those headers." |
17493 | 905 :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
|
906 :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
|
907 :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
|
908 (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
|
909 (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
|
910 (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
|
911 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
912 (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
|
913 "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
|
914 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
|
915 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
|
916 :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
|
917 ;; :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
|
918 :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
|
919 (integer))) |
17493 | 920 |
106358
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
921 (defcustom message-setup-hook nil |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
922 "Normal hook, run each time a new outgoing message is initialized. |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
923 The function `message-setup' runs this hook." |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
924 :group 'message-various |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
925 :link '(custom-manual "(message)Various Message Variables") |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
926 :type 'hook) |
17493 | 927 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
928 (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
|
929 "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
|
930 :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
|
931 :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
|
932 :type 'hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
933 |
17493 | 934 (defcustom message-signature-setup-hook nil |
935 "Normal hook, run each time a new outgoing message is initialized. | |
936 It is run after the headers have been inserted and before | |
937 the signature is inserted." | |
938 :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
|
939 :link '(custom-manual "(message)Various Message Variables") |
17493 | 940 :type 'hook) |
941 | |
942 (defcustom message-mode-hook nil | |
943 "Hook run in message mode buffers." | |
944 :group 'message-various | |
945 :type 'hook) | |
946 | |
947 (defcustom message-header-hook nil | |
948 "Hook run in a message mode buffer narrowed to the headers." | |
949 :group 'message-various | |
950 :type 'hook) | |
951 | |
952 (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
|
953 "Hook called narrowed to the headers when setting up a message buffer." |
17493 | 954 :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
|
955 :link '(custom-manual "(message)Various Message Variables") |
17493 | 956 :type 'hook) |
957 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
958 (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
|
959 (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
|
960 (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
|
961 map) |
57856
df80d19d7a2e
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
962 "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
|
963 :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
|
964 :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
|
965 |
17493 | 966 (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
|
967 "*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
|
968 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
969 Predefined functions include `message-insert-citation-line' and |
85974 | 970 `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
|
971 `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
|
972 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
973 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
|
974 `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
|
975 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
|
976 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
|
977 :type '(choice |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
978 (function-item :tag "plain" message-insert-citation-line) |
85974 | 979 (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
|
980 (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
|
981 :link '(custom-manual "(message)Insertion Variables") |
17493 | 982 :group 'message-insertion) |
983 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
984 (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
|
985 "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
|
986 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
987 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
|
988 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
|
989 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
990 %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
|
991 %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
|
992 %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
|
993 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
|
994 %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
|
995 %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
|
996 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
997 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
|
998 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
|
999 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
|
1000 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
|
1001 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1002 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
|
1003 `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
|
1004 :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
|
1005 (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
|
1006 string) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1007 :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
|
1008 :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
|
1009 :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
|
1010 |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1011 (defcustom message-yank-prefix |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1012 ;; Default to the value of `mail-yank-prefix' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1013 ;; Note: as for Emacs 21, it is unavailable unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1014 (if (boundp 'mail-yank-prefix) mail-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
|
1015 "*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
|
1016 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
|
1017 See also `message-yank-cited-prefix' and `message-yank-empty-prefix'." |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1018 :version "23.2" |
17493 | 1019 :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
|
1020 :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
|
1021 :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
|
1022 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1023 (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
|
1024 "*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
|
1025 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
|
1026 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
|
1027 :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
|
1028 :type 'string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1029 :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
|
1030 :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
|
1031 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1032 (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
|
1033 "*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
|
1034 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
|
1035 :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
|
1036 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1037 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1038 :group 'message-insertion) |
1039 | |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
1040 (defcustom message-indentation-spaces |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1041 ;; Default to the value of `mail-indentation-spaces' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1042 ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1043 ;; unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1044 (if (boundp 'mail-indentation-spaces) mail-indentation-spaces 3) |
17493 | 1045 "*Number of spaces to insert at the beginning of each cited line. |
1046 Used by `message-yank-original' via `message-yank-cite'." | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1047 :version "23.2" |
17493 | 1048 :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
|
1049 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1050 :type 'integer) |
1051 | |
93386 | 1052 (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
|
1053 "*Function for citing an original message. |
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
1054 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
|
1055 `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
|
1056 Note that these functions use `mail-citation-hook' if that is non-nil." |
17493 | 1057 :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
|
1058 (function-item message-cite-original-without-signature) |
17493 | 1059 (function-item sc-cite-original) |
1060 (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
|
1061 :link '(custom-manual "(message)Insertion Variables") |
94209 | 1062 :version "22.3" ;; Gnus 5.10.12 (changed default) |
17493 | 1063 :group 'message-insertion) |
1064 | |
1065 (defcustom message-indent-citation-function 'message-indent-citation | |
1066 "*Function for modifying a citation just inserted in the mail buffer. | |
1067 This can also be a list of functions. Each function can find the | |
1068 citation between (point) and (mark t). And each function should leave | |
1069 point and mark around the citation text as modified." | |
1070 :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
|
1071 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1072 :group 'message-insertion) |
1073 | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1074 (defcustom message-signature mail-signature |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1075 ;; Default to the value of `mail-signature', available in all Emacsen |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1076 ;; that Gnus supports. |
17493 | 1077 "*String to be inserted at the end of the message buffer. |
1078 If t, the `message-signature-file' file will be inserted instead. | |
1079 If a function, the result from the function will be used instead. | |
1080 If a form, the result from the form will be used instead." | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1081 :version "23.2" |
17493 | 1082 :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
|
1083 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1084 :group 'message-insertion) |
1085 | |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
1086 (defcustom message-signature-file |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1087 ;; Default to the value of `mail-signature-file' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1088 ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1089 ;; unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1090 (if (boundp 'mail-signature-file) mail-signature-file "~/.signature") |
36036
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
1091 "*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
|
1092 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
|
1093 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
|
1094 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
|
1095 even if set." |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1096 :version "23.2" |
36036
dcbe0206da25
(message-signature-file): Fix doc, :type.
Dave Love <fx@gnu.org>
parents:
35957
diff
changeset
|
1097 :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
|
1098 :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
|
1099 :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
|
1100 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1101 (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
|
1102 "*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
|
1103 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
|
1104 instance. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1105 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
|
1106 needed." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1107 :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
|
1108 :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
|
1109 :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
|
1110 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1111 (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
|
1112 "*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
|
1113 :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
|
1114 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1115 :link '(custom-manual "(message)Insertion Variables") |
17493 | 1116 :group 'message-insertion) |
1117 | |
1118 (defcustom message-distribution-function nil | |
1119 "*Function called to return a Distribution header." | |
1120 :group 'message-news | |
1121 :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
|
1122 :link '(custom-manual "(message)News Headers") |
35147 | 1123 :type '(choice function (const nil))) |
17493 | 1124 |
1125 (defcustom message-expires 14 | |
1126 "Number of days before your article expires." | |
1127 :group 'message-news | |
1128 :group 'message-headers | |
1129 :link '(custom-manual "(message)News Headers") | |
1130 :type 'integer) | |
1131 | |
1132 (defcustom message-user-path nil | |
1133 "If nil, use the NNTP server name in the Path header. | |
1134 If stringp, use this; if non-nil, use no host name (user name only)." | |
1135 :group 'message-news | |
1136 :group 'message-headers | |
1137 :link '(custom-manual "(message)News Headers") | |
1138 :type '(choice (const :tag "nntp" nil) | |
1139 (string :tag "name") | |
1140 (sexp :tag "none" :format "%t" t))) | |
1141 | |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
1142 ;; This can be the name of a buffer, or a cons cell (FUNCTION . ARGS) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
1143 ;; for yanking the original buffer. |
17493 | 1144 (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
|
1145 (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
|
1146 "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
|
1147 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
|
1148 \[number subject from date id references chars lines xref extra].") |
17493 | 1149 (defvar message-newsreader nil) |
1150 (defvar message-mailer nil) | |
1151 (defvar message-sent-message-via nil) | |
1152 (defvar message-checksum nil) | |
1153 (defvar message-send-actions nil | |
1154 "A list of actions to be performed upon successful sending of a message.") | |
1155 (defvar message-exit-actions nil | |
1156 "A list of actions to be performed upon exiting after sending a message.") | |
1157 (defvar message-kill-actions nil | |
1158 "A list of actions to be performed before killing a message buffer.") | |
1159 (defvar message-postpone-actions nil | |
1160 "A list of actions to be performed after postponing a message.") | |
1161 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1162 (define-widget 'message-header-lines 'text |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1163 "All header lines must be LFD terminated." |
33982
ff339ba39162
(message-header-lines): Fontify tag.
Miles Bader <miles@gnu.org>
parents:
33768
diff
changeset
|
1164 :format "%{%t%}:%n%v" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1165 :valid-regexp "^\\'" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1166 :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
|
1167 |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
1168 (defcustom message-default-headers |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1169 ;; Default to the value of `mail-default-headers' if available. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1170 ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1171 ;; unless sendmail.el is loaded. |
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1172 (if (boundp 'mail-default-headers) mail-default-headers "") |
17493 | 1173 "*A string containing header lines to be inserted in outgoing messages. |
1174 It is inserted before you edit the message, so you can edit or delete | |
1175 these lines." | |
106218
8ccde493b34d
(message-from-style, message-interactive, message-signature): Always set
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
106152
diff
changeset
|
1176 :version "23.2" |
17493 | 1177 :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
|
1178 :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
|
1179 :type 'message-header-lines) |
17493 | 1180 |
107157
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1181 (defcustom message-default-mail-headers |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1182 ;; Ease the transition from mail-mode to message-mode. See bugs#4431, 5555. |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1183 (concat (if (and (boundp 'mail-default-reply-to) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1184 (stringp mail-default-reply-to)) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1185 (format "Reply-to: %s\n" mail-default-reply-to) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1186 "") |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1187 (if (and (boundp 'mail-self-blind) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1188 mail-self-blind) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1189 (format "BCC: %s\n" user-mail-address) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1190 "") |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1191 (if (and (boundp 'mail-archive-file-name) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1192 (stringp mail-archive-file-name)) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1193 (format "FCC: %s\n" mail-archive-file-name) |
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1194 "")) |
17493 | 1195 "*A string of header lines to be inserted in outgoing mails." |
107157
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
1196 :version "23.2" |
17493 | 1197 :group 'message-headers |
1198 :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
|
1199 :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
|
1200 :type 'message-header-lines) |
17493 | 1201 |
1202 (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
|
1203 "*A string of header lines to be inserted in outgoing news articles." |
17493 | 1204 :group 'message-headers |
1205 :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
|
1206 :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
|
1207 :type 'message-header-lines) |
17493 | 1208 |
1209 ;; Note: could use /usr/ucb/mail instead of sendmail; | |
1210 ;; options -t, and -v if not interactive. | |
1211 (defcustom message-mailer-swallows-blank-line | |
1212 (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" | |
1213 system-configuration) | |
1214 (file-readable-p "/etc/sendmail.cf") | |
1215 (let ((buffer (get-buffer-create " *temp*"))) | |
1216 (unwind-protect | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
1217 (with-current-buffer buffer |
17493 | 1218 (insert-file-contents "/etc/sendmail.cf") |
1219 (goto-char (point-min)) | |
1220 (let ((case-fold-search nil)) | |
1221 (re-search-forward "^OR\\>" nil t))) | |
1222 (kill-buffer buffer)))) | |
1223 ;; According to RFC822, "The field-name must be composed of printable | |
1224 ;; ASCII characters (i. e., characters that have decimal values between | |
1225 ;; 33 and 126, except colon)", i. e., any chars except ctl chars, | |
1226 ;; space, or colon. | |
1227 '(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
|
1228 "*Set this non-nil if the system's mailer runs the header and body together. |
17493 | 1229 \(This problem exists on Sunos 4 when sendmail is run in remote mode.) |
1230 The value should be an expression to test whether the problem will | |
1231 actually occur." | |
1232 :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
|
1233 :link '(custom-manual "(message)Mail Variables") |
17493 | 1234 :type 'sexp) |
1235 | |
19481
4d492290e085
(message-user-agent): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
1236 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1237 (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
|
1238 '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
|
1239 'message-kill-buffer 'message-send-hook) |
17493 | 1240 |
1241 (defvar message-mh-deletable-headers '(Message-ID Date Lines Sender) | |
1242 "If non-nil, delete the deletable headers before feeding to mh.") | |
1243 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1244 (defvar message-send-method-alist |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1245 '((news message-news-p message-send-via-news) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1246 (mail message-mail-p message-send-via-mail)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1247 "Alist of ways to send outgoing messages. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1248 Each element has the form |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1249 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1250 \(TYPE PREDICATE FUNCTION) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1251 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1252 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
|
1253 called without any parameters to determine whether the message is |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1254 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
|
1255 PREDICATE returns non-nil. FUNCTION is called with one parameter -- |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1256 the prefix.") |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1257 |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1258 (defcustom message-mail-alias-type 'abbrev |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1259 "*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
|
1260 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
|
1261 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
|
1262 This can also be a list of values." |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1263 :group 'message |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1264 :link '(custom-manual "(message)Mail Aliases") |
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1265 :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
|
1266 (const :tag "Use ecomplete" ecomplete) |
34058
9f5e2364ef2b
(message-mail-alias-type): Customize.
Dave Love <fx@gnu.org>
parents:
34057
diff
changeset
|
1267 (const :tag "No expansion" nil))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
1268 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1269 (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
|
1270 "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
|
1271 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
|
1272 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
|
1273 `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
|
1274 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
|
1275 `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
|
1276 :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
|
1277 :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
|
1278 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1279 (defcustom message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
1280 (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
|
1281 "*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
|
1282 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
|
1283 :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
|
1284 :link '(custom-manual "(message)Various Message Variables") |
35147 | 1285 :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
|
1286 |
35147 | 1287 (defcustom message-default-charset |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1288 (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
|
1289 "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
|
1290 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
|
1291 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1292 :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
|
1293 :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
|
1294 :type 'symbol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1295 |
35147 | 1296 (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
|
1297 (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
|
1298 "*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
|
1299 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
|
1300 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
|
1301 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1302 :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
|
1303 :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
|
1304 :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
|
1305 regexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1306 (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
|
1307 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1308 (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
|
1309 (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
|
1310 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1311 (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
|
1312 "*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
|
1313 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
|
1314 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
|
1315 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
|
1316 candidates: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1317 `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
|
1318 `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
|
1319 `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
|
1320 `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
|
1321 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
|
1322 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1323 (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
|
1324 (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
|
1325 (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
|
1326 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1327 (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
|
1328 "^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
|
1329 "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
|
1330 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
|
1331 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
|
1332 :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
|
1333 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1334 :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
|
1335 :type '(choice |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1336 :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
|
1337 (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
|
1338 (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
|
1339 (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
|
1340 (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
|
1341 (const not) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1342 (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
|
1343 (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
|
1344 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1345 (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
|
1346 "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
|
1347 :group 'message |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1348 :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
|
1349 |
17493 | 1350 ;;; Internal variables. |
1351 ;;; Well, not really internal. | |
1352 | |
1353 (defvar message-mode-syntax-table | |
1354 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
1355 (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
|
1356 (modify-syntax-entry ?> ". " table) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1357 (modify-syntax-entry ?< ". " table) |
17493 | 1358 table) |
1359 "Syntax table used while in Message mode.") | |
1360 | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1361 (defface message-header-to |
17493 | 1362 '((((class color) |
1363 (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
|
1364 (:foreground "DarkOliveGreen1" :bold t)) |
17493 | 1365 (((class color) |
1366 (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
|
1367 (:foreground "MidnightBlue" :bold t)) |
17493 | 1368 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1369 (:bold t :italic t))) |
17493 | 1370 "Face used for displaying From headers." |
1371 :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
|
1372 ;; 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
|
1373 (put 'message-header-to-face 'face-alias 'message-header-to) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1374 (put 'message-header-to-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1375 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1376 (defface message-header-cc |
17493 | 1377 '((((class color) |
1378 (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
|
1379 (:foreground "chartreuse1" :bold t)) |
17493 | 1380 (((class color) |
1381 (background light)) | |
1382 (:foreground "MidnightBlue")) | |
1383 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1384 (:bold t))) |
17493 | 1385 "Face used for displaying Cc headers." |
1386 :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
|
1387 ;; 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
|
1388 (put 'message-header-cc-face 'face-alias 'message-header-cc) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1389 (put 'message-header-cc-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1390 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1391 (defface message-header-subject |
17493 | 1392 '((((class color) |
1393 (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
|
1394 (:foreground "OliveDrab1")) |
17493 | 1395 (((class color) |
1396 (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
|
1397 (:foreground "navy blue" :bold t)) |
17493 | 1398 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1399 (:bold t))) |
17493 | 1400 "Face used for displaying subject headers." |
1401 :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
|
1402 ;; 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
|
1403 (put 'message-header-subject-face 'face-alias 'message-header-subject) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1404 (put 'message-header-subject-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1405 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1406 (defface message-header-newsgroups |
17493 | 1407 '((((class color) |
1408 (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
|
1409 (:foreground "yellow" :bold t :italic t)) |
17493 | 1410 (((class color) |
1411 (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
|
1412 (:foreground "blue4" :bold t :italic t)) |
17493 | 1413 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1414 (:bold t :italic t))) |
17493 | 1415 "Face used for displaying newsgroups headers." |
1416 :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
|
1417 ;; 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
|
1418 (put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1419 (put 'message-header-newsgroups-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1420 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1421 (defface message-header-other |
17493 | 1422 '((((class color) |
1423 (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
|
1424 (:foreground "VioletRed1")) |
17493 | 1425 (((class color) |
1426 (background light)) | |
1427 (:foreground "steel blue")) | |
1428 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1429 (:bold t :italic t))) |
17493 | 1430 "Face used for displaying newsgroups headers." |
1431 :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
|
1432 ;; 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
|
1433 (put 'message-header-other-face 'face-alias 'message-header-other) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1434 (put 'message-header-other-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1435 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1436 (defface message-header-name |
17493 | 1437 '((((class color) |
1438 (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
|
1439 (:foreground "green")) |
17493 | 1440 (((class color) |
1441 (background light)) | |
1442 (:foreground "cornflower blue")) | |
1443 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1444 (:bold t))) |
17493 | 1445 "Face used for displaying header names." |
1446 :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
|
1447 ;; 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
|
1448 (put 'message-header-name-face 'face-alias 'message-header-name) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1449 (put 'message-header-name-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1450 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1451 (defface message-header-xheader |
17493 | 1452 '((((class color) |
1453 (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
|
1454 (:foreground "DeepSkyBlue1")) |
17493 | 1455 (((class color) |
1456 (background light)) | |
1457 (:foreground "blue")) | |
1458 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1459 (:bold t))) |
17493 | 1460 "Face used for displaying X-Header headers." |
1461 :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
|
1462 ;; 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
|
1463 (put 'message-header-xheader-face 'face-alias 'message-header-xheader) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1464 (put 'message-header-xheader-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1465 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1466 (defface message-separator |
17493 | 1467 '((((class color) |
1468 (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
|
1469 (:foreground "LightSkyBlue1")) |
17493 | 1470 (((class color) |
1471 (background light)) | |
1472 (:foreground "brown")) | |
1473 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1474 (:bold t))) |
17493 | 1475 "Face used for displaying the separator." |
1476 :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
|
1477 ;; 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
|
1478 (put 'message-separator-face 'face-alias 'message-separator) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1479 (put 'message-separator-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1480 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1481 (defface message-cited-text |
17493 | 1482 '((((class color) |
1483 (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
|
1484 (:foreground "LightPink1")) |
17493 | 1485 (((class color) |
1486 (background light)) | |
1487 (:foreground "red")) | |
1488 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1489 (:bold t))) |
17493 | 1490 "Face used for displaying cited text names." |
1491 :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
|
1492 ;; 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
|
1493 (put 'message-cited-text-face 'face-alias 'message-cited-text) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1494 (put 'message-cited-text-face 'obsolete-face "22.1") |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1495 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63398
diff
changeset
|
1496 (defface message-mml |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1497 '((((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1498 (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
|
1499 (:foreground "MediumSpringGreen")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1500 (((class color) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1501 (background light)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1502 (:foreground "ForestGreen")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1503 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1504 (:bold t))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1505 "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
|
1506 :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
|
1507 ;; 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
|
1508 (put 'message-mml-face 'face-alias 'message-mml) |
104789
aa91debbb2f2
Mark face aliases with "-face" in the name as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
102061
diff
changeset
|
1509 (put 'message-mml-face 'obsolete-face "22.1") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1510 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1511 (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
|
1512 (let ((form |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1513 `(lambda (limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1514 (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
|
1515 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1516 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1517 (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
|
1518 (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
|
1519 (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
|
1520 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1521 (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
|
1522 (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
|
1523 (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
|
1524 (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
|
1525 (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
|
1526 (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
|
1527 form))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1528 |
17493 | 1529 (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
|
1530 (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
|
1531 `((,(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
|
1532 (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
|
1533 (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
|
1534 (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
|
1535 (,(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
|
1536 (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
|
1537 (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
|
1538 (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
|
1539 (,(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
|
1540 (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
|
1541 (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
|
1542 (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
|
1543 (,(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
|
1544 (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
|
1545 (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
|
1546 (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
|
1547 (,(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
|
1548 (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
|
1549 (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
|
1550 (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
|
1551 (,(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
|
1552 (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
|
1553 (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
|
1554 (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
|
1555 ,@(if (and mail-header-separator |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1556 (not (equal mail-header-separator ""))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1557 `((,(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
|
1558 1 'message-separator)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1559 nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1560 ((lambda (limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1561 (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
|
1562 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
|
1563 "\\).*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1564 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
|
1565 (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
|
1566 ("<#/?\\(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
|
1567 (0 'message-mml)))) |
17493 | 1568 "Additional expressions to highlight in Message mode.") |
1569 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1570 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1571 ;; 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
|
1572 ;; `font-lock-defaults' buffer-local variable. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1573 (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
|
1574 |
17493 | 1575 (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
|
1576 '((bold . message-bold-region) |
17493 | 1577 (underline . underline-region) |
1578 (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
|
1579 (message-unbold-region b e) |
17493 | 1580 (ununderline-region b e)))) |
1581 "Alist of mail and news faces for facemenu. | |
48588 | 1582 The cdr of each entry is a function for applying the face to a region.") |
17493 | 1583 |
106358
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1584 (defcustom message-send-hook nil |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1585 "Hook run before sending messages. |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1586 This hook is run quite early when sending." |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1587 :group 'message-various |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1588 :options '(ispell-message) |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1589 :link '(custom-manual "(message)Various Message Variables") |
8acd940e483a
* message.el: Revert last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
106353
diff
changeset
|
1590 :type 'hook) |
17493 | 1591 |
1592 (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
|
1593 "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
|
1594 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
|
1595 mail." |
17493 | 1596 :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
|
1597 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1598 :type 'hook) |
1599 | |
1600 (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
|
1601 "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
|
1602 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
|
1603 news." |
17493 | 1604 :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
|
1605 :link '(custom-manual "(message)Various Message Variables") |
17493 | 1606 :type 'hook) |
1607 | |
1608 (defcustom message-sent-hook nil | |
1609 "Hook run after sending messages." | |
1610 :group 'message-various | |
1611 :type 'hook) | |
1612 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1613 (defvar message-send-coding-system 'binary |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1614 "Coding system to encode outgoing mail.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1615 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1616 (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
|
1617 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
|
1618 "*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
|
1619 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
|
1620 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
|
1621 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
|
1622 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1623 (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
|
1624 "The limitation of messages sent as message/partial. |
35147 | 1625 The lower bound of message size in characters, beyond which the message |
1626 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
|
1627 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1628 :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
|
1629 :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
|
1630 :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
|
1631 (integer 1000000))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1632 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1633 (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
|
1634 "*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
|
1635 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
|
1636 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
|
1637 outgoing messages. |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1638 |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
1639 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
|
1640 off `message-setup-hook'." |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1641 :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
|
1642 :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
|
1643 :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
|
1644 regexp)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1645 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1646 (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
|
1647 "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
|
1648 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1649 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
|
1650 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
|
1651 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
|
1652 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
|
1653 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
|
1654 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
|
1655 downcased." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
1656 :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
|
1657 :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
|
1658 :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
|
1659 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1660 (defcustom message-mail-user-agent nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1661 "Like `mail-user-agent'. |
35147 | 1662 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
|
1663 `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
|
1664 :version "22.1" |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1665 :type '(radio (const :tag "Gnus native" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1666 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1667 nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1668 (const :tag "`mail-user-agent'" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1669 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1670 t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1671 (function-item :tag "Default Emacs mail" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1672 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1673 sendmail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1674 (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
|
1675 :format "%t\n" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1676 mh-e-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1677 (function :tag "Other")) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1678 :version "21.1" |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1679 :group 'message) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
1680 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1681 (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
|
1682 "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
|
1683 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
|
1684 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
|
1685 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
|
1686 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
|
1687 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
|
1688 :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
|
1689 :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
|
1690 :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
|
1691 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1692 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1693 (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
|
1694 "*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
|
1695 :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
|
1696 :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
|
1697 :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
|
1698 :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
|
1699 (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
|
1700 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1701 (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
|
1702 (file-error)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1703 (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
|
1704 (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
|
1705 (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
|
1706 "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
|
1707 t) |
8e46fef0174c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1708 "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
|
1709 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
|
1710 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
|
1711 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
|
1712 :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
|
1713 :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
|
1714 :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
|
1715 :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
|
1716 (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
|
1717 (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
|
1718 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1719 (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
|
1720 "*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
|
1721 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
|
1722 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
|
1723 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
|
1724 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1725 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
|
1726 :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
|
1727 :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
|
1728 :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
|
1729 (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
|
1730 (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
|
1731 |
17493 | 1732 ;;; Internal variables. |
1733 | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
1734 (defvar message-sending-message "Sending...") |
17493 | 1735 (defvar message-buffer-list nil) |
1736 (defvar message-this-is-news nil) | |
1737 (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
|
1738 (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
|
1739 (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
|
1740 (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
|
1741 (defvar message-inserted-headers nil) |
17493 | 1742 |
1743 ;; Byte-compiler warning | |
86154 | 1744 (defvar gnus-active-hashtb) |
1745 (defvar gnus-read-active-file) | |
17493 | 1746 |
1747 ;;; 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
|
1748 ;;; (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
|
1749 ;;; of rmail.el's rmail-unix-mail-delimiter. |
17493 | 1750 (defvar message-unix-mail-delimiter |
1751 (let ((time-zone-regexp | |
1752 (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?" | |
1753 "\\|[-+]?[0-9][0-9][0-9][0-9]" | |
1754 "\\|" | |
1755 "\\) *"))) | |
1756 (concat | |
1757 "From " | |
1758 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1759 ;; 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
|
1760 ;; 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
|
1761 ;; `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
|
1762 ;; `<@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
|
1763 ;; can be removed, e.g. |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1764 ;; From: joe@y.z (Joe K |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1765 ;; User) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1766 ;; 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
|
1767 ;; From: Joe User |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1768 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1769 ;; 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
|
1770 ;; 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
|
1771 ;; From: "Joe User"{space}{tab} |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1772 ;; <joe@y.z> |
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1773 ;; 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
|
1774 ;; 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
|
1775 ;; 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
|
1776 ;; 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
|
1777 ;; 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
|
1778 "\\([^\0-\b\n-\r\^?].*\\)?" |
17493 | 1779 |
1780 ;; 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
|
1781 "\\([^\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
|
1782 "\\([^\0-\r \^?]+\\) +" ; month |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1783 "\\([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
|
1784 "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day |
17493 | 1785 |
1786 ;; Perhaps a time zone, specified by an abbreviation, or by a | |
1787 ;; numeric offset. | |
1788 time-zone-regexp | |
1789 | |
1790 ;; The year. | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1791 " \\([0-9][0-9]+\\) *" |
17493 | 1792 |
1793 ;; On some systems the time zone can appear after the year, too. | |
1794 time-zone-regexp | |
1795 | |
1796 ;; Old uucp cruft. | |
1797 "\\(remote from .*\\)?" | |
1798 | |
19762
f6ca32374b0b
(message-unix-mail-delimiter): Initialize
Richard M. Stallman <rms@gnu.org>
parents:
19525
diff
changeset
|
1799 "\n")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1800 "Regexp matching the delimiter of messages in UNIX mail format.") |
17493 | 1801 |
1802 (defvar message-unsent-separator | |
1803 (concat "^ *---+ +Unsent message follows +---+ *$\\|" | |
1804 "^ *---+ +Returned message +---+ *$\\|" | |
1805 "^Start of returned message$\\|" | |
1806 "^ *---+ +Original message +---+ *$\\|" | |
1807 "^ *--+ +begin message +--+ *$\\|" | |
1808 "^ *---+ +Original message follows +---+ *$\\|" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1809 "^ *---+ +Undelivered message follows +---+ *$\\|" |
92147 | 1810 "^------ This is a copy of the message, including all the headers. ------ *$\\|" |
17493 | 1811 "^|? *---+ +Message text follows: +---+ *|?$") |
1812 "A regexp that matches the separator before the text of a failed message.") | |
1813 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1814 (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
|
1815 '((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
|
1816 (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
|
1817 (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
|
1818 "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
|
1819 |
17493 | 1820 (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
|
1821 `((From) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1822 (Newsgroups) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1823 (To) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
1824 (Cc) |
17493 | 1825 (Subject) |
1826 (In-Reply-To) | |
1827 (Fcc) | |
1828 (Bcc) | |
1829 (Date) | |
1830 (Organization) | |
1831 (Distribution) | |
1832 (Lines) | |
1833 (Expires) | |
1834 (Message-ID) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1835 (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
|
1836 (User-Agent)) |
17493 | 1837 "Alist used for formatting headers.") |
1838 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1839 (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
|
1840 "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
|
1841 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1842 (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
|
1843 "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
|
1844 |
74984 | 1845 (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
|
1846 "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
|
1847 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1848 (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
|
1849 (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
|
1850 ;; valid TLDs: |
70245
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1851 "\\([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
|
1852 "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
|
1853 "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
|
1854 "info\\|int\\|jobs\\|" |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1855 "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
|
1856 "org\\|pro\\|travel\\|uucp\\)") |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
1857 ;; 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
|
1858 ;; 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
|
1859 ;; `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
|
1860 ;; "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
|
1861 "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
|
1862 ;; 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
|
1863 :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
|
1864 :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
|
1865 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1866 |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1867 (autoload 'gnus-alive-p "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1868 (autoload 'gnus-delay-article "gnus-delay") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1869 (autoload 'gnus-extract-address-components "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1870 (autoload 'gnus-find-method-for-group "gnus") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1871 (autoload 'gnus-group-decoded-name "gnus-group") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1872 (autoload 'gnus-group-name-charset "gnus-group") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1873 (autoload 'gnus-group-name-decode "gnus-group") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1874 (autoload 'gnus-groups-from-server "gnus") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1875 (autoload 'gnus-make-local-hook "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1876 (autoload 'gnus-open-server "gnus-int") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1877 (autoload 'gnus-output-to-mail "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1878 (autoload 'gnus-output-to-rmail "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1879 (autoload 'gnus-request-post "gnus-int") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1880 (autoload 'gnus-select-frame-set-input-focus "gnus-util") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1881 (autoload 'gnus-server-string "gnus") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1882 (autoload 'idna-to-ascii "idna") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1883 (autoload 'message-setup-toolbar "messagexmas") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1884 (autoload 'mh-new-draft-name "mh-comp") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1885 (autoload 'mh-send-letter "mh-comp") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1886 (autoload 'nndraft-request-associate-buffer "nndraft") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1887 (autoload 'nndraft-request-expire-articles "nndraft") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1888 (autoload 'nnvirtual-find-group-art "nnvirtual") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1889 (autoload 'rmail-dont-reply-to "mail-utils") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1890 (autoload 'rmail-msg-is-pruned "rmail") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
1891 (autoload 'rmail-output "rmailout") |
17493 | 1892 |
1893 | |
1894 | |
1895 ;;; | |
1896 ;;; Utility functions. | |
1897 ;;; | |
1898 | |
1899 (defmacro message-y-or-n-p (question show &rest text) | |
35147 | 1900 "Ask QUESTION, displaying remaining args in a temporary buffer if SHOW." |
17493 | 1901 `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) |
1902 | |
1903 (defmacro message-delete-line (&optional n) | |
35147 | 1904 "Delete the current line (and the next N lines)." |
17493 | 1905 `(delete-region (progn (beginning-of-line) (point)) |
1906 (progn (forward-line ,(or n 1)) (point)))) | |
1907 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1908 (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
|
1909 "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
|
1910 mark-active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1911 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1912 (defun message-unquote-tokens (elems) |
35147 | 1913 "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
|
1914 (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
|
1915 (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
|
1916 (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
|
1917 (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
|
1918 item) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1919 elems)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1920 |
17493 | 1921 (defun message-tokenize-header (header &optional separator) |
1922 "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
|
1923 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
|
1924 is used by default." |
17493 | 1925 (if (not header) |
1926 nil | |
1927 (let ((regexp (format "[%s]+" (or separator ","))) | |
1928 (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
|
1929 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
|
1930 (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
|
1931 (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
|
1932 (setq beg (point-min)) |
17493 | 1933 (insert header) |
1934 (goto-char (point-min)) | |
1935 (while (not (eobp)) | |
1936 (if first | |
1937 (setq first nil) | |
1938 (forward-char 1)) | |
1939 (cond ((and (> (point) beg) | |
1940 (or (eobp) | |
1941 (and (looking-at regexp) | |
1942 (not quoted) | |
1943 (not paren)))) | |
1944 (push (buffer-substring beg (point)) elems) | |
1945 (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
|
1946 ((eq (char-after) ?\") |
17493 | 1947 (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
|
1948 ((and (eq (char-after) ?\() |
17493 | 1949 (not quoted)) |
1950 (setq paren t)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1951 ((and (eq (char-after) ?\)) |
17493 | 1952 (not quoted)) |
1953 (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
|
1954 (nreverse elems))))) |
17493 | 1955 |
1956 (defun message-mail-file-mbox-p (file) | |
1957 "Say whether FILE looks like a Unix mbox file." | |
1958 (when (and (file-exists-p file) | |
1959 (file-readable-p file) | |
1960 (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
|
1961 (with-temp-buffer |
17493 | 1962 (nnheader-insert-file-contents file) |
1963 (goto-char (point-min)) | |
1964 (looking-at message-unix-mail-delimiter)))) | |
1965 | |
1966 (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
|
1967 "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
|
1968 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
|
1969 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
|
1970 (let* ((inhibit-point-motion-hooks t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
1971 (value (mail-fetch-field header nil (not not-all)))) |
17493 | 1972 (when value |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1973 (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
|
1974 (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
|
1975 value))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1976 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1977 (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
|
1978 "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
|
1979 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1980 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
1981 (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
|
1982 (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
|
1983 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1984 (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
|
1985 "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
|
1986 (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
|
1987 (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
|
1988 (forward-line -1)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1989 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1990 (point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1991 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1992 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1993 (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
|
1994 (point-at-bol) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1995 (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
1996 (goto-char (point-min))) |
17493 | 1997 |
1998 (defun message-add-header (&rest headers) | |
1999 "Add the HEADERS to the message header, skipping those already present." | |
2000 (while headers | |
2001 (let (hclean) | |
2002 (unless (string-match "^\\([^:]+\\):[ \t]*[^ \t]" (car headers)) | |
2003 (error "Invalid header `%s'" (car headers))) | |
2004 (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
|
2005 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2006 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2007 (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
|
2008 (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
|
2009 (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
|
2010 (insert (car headers)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2011 (insert (car headers) ?\n))))) |
17493 | 2012 (setq headers (cdr headers)))) |
2013 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2014 (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
|
2015 "Evaluate FORMS in the reply buffer, if it exists." |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
2016 `(when (and (bufferp 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
|
2017 (buffer-name message-reply-buffer)) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
2018 (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
|
2019 ,@forms))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2020 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2021 (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
|
2022 (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
|
2023 |
17493 | 2024 (defun message-fetch-reply-field (header) |
35147 | 2025 "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
|
2026 (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
|
2027 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2028 (mail-narrow-to-head) |
17493 | 2029 (message-fetch-field header)))) |
2030 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2031 (defun message-strip-list-identifiers (subject) |
35147 | 2032 "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
|
2033 (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
|
2034 (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
|
2035 gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2036 (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
35147 | 2037 (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
|
2038 " *\\)\\)+\\(Re: +\\)?\\)") subject) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2039 (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
|
2040 (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
|
2041 (match-string 5 subject)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2042 (substring subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2043 (match-end 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2044 subject))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2045 |
17493 | 2046 (defun message-strip-subject-re (subject) |
35147 | 2047 "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
|
2048 (if (string-match message-subject-re-regexp subject) |
17493 | 2049 (substring subject (match-end 0)) |
2050 subject)) | |
2051 | |
74021 | 2052 (defcustom message-replacement-char "." |
2053 "Replacement character used instead of unprintable or not decodable chars." | |
2054 :group 'message-various | |
2055 :version "22.1" ;; Gnus 5.10.9 | |
2056 :type '(choice string | |
2057 (const ".") | |
2058 (const "?"))) | |
2059 | |
2060 ;; FIXME: We also should call `message-strip-subject-encoded-words' | |
2061 ;; when forwarding. Probably in `message-make-forward-subject' and | |
2062 ;; `message-forward-make-body'. | |
2063 | |
2064 (defun message-strip-subject-encoded-words (subject) | |
2065 "Fix non-decodable words in SUBJECT." | |
2066 ;; Cf. `gnus-simplify-subject-fully'. | |
2067 (let* ((case-fold-search t) | |
2068 (replacement-chars (format "[%s%s%s]" | |
2069 message-replacement-char | |
2070 message-replacement-char | |
2071 message-replacement-char)) | |
2072 (enc-word-re "=\\?\\([^?]+\\)\\?\\([QB]\\)\\?\\([^?]+\\)\\(\\?=\\)") | |
2073 cs-string | |
2074 (have-marker | |
2075 (with-temp-buffer | |
2076 (insert subject) | |
2077 (goto-char (point-min)) | |
2078 (when (re-search-forward enc-word-re nil t) | |
2079 (setq cs-string (match-string 1))))) | |
2080 cs-coding q-or-b word-beg word-end) | |
2081 (if (or (not have-marker) ;; No encoded word found... | |
2082 ;; ... or double encoding was correct: | |
2083 (and (stringp cs-string) | |
2084 (setq cs-string (downcase cs-string)) | |
2085 (mm-coding-system-p (intern cs-string)) | |
2086 (not (prog1 | |
2087 (y-or-n-p | |
2088 (format "\ | |
2089 Decoded Subject \"%s\" | |
2090 contains a valid encoded word. Decode again? " | |
2091 subject)) | |
2092 (setq cs-coding (intern cs-string)))))) | |
2093 subject | |
2094 (with-temp-buffer | |
2095 (insert subject) | |
2096 (goto-char (point-min)) | |
2097 (while (re-search-forward enc-word-re nil t) | |
2098 (setq cs-string (downcase (match-string 1)) | |
2099 q-or-b (match-string 2) | |
2100 word-beg (match-beginning 0) | |
2101 word-end (match-end 0)) | |
2102 (setq cs-coding | |
2103 (if (mm-coding-system-p (intern cs-string)) | |
2104 (setq cs-coding (intern cs-string)) | |
2105 nil)) | |
2106 ;; No double encoded subject? => bogus charset. | |
2107 (unless cs-coding | |
2108 (setq cs-coding | |
2109 (mm-read-coding-system | |
2110 (format "\ | |
2111 Decoded Subject \"%s\" | |
2112 contains an encoded word. The charset `%s' is unknown or invalid. | |
2113 Hit RET to replace non-decodable characters with \"%s\" or enter replacement | |
2114 charset: " | |
2115 subject cs-string message-replacement-char))) | |
2116 (if cs-coding | |
2117 (replace-match (concat "=?" (symbol-name cs-coding) | |
2118 "?\\2?\\3\\4\\5")) | |
2119 (save-excursion | |
2120 (goto-char word-beg) | |
2121 (re-search-forward "=\\?\\([^?]+\\)\\?\\([QB]\\)\\?" word-end t) | |
2122 (replace-match "") | |
2123 ;; QP or base64 | |
2124 (if (string-match "\\`Q\\'" q-or-b) | |
2125 ;; QP | |
2126 (progn | |
2127 (message "Replacing non-decodable characters with \"%s\"." | |
2128 message-replacement-char) | |
2129 (while (re-search-forward "\\(=[A-F0-9][A-F0-9]\\)+" | |
2130 word-end t) | |
2131 (replace-match message-replacement-char))) | |
2132 ;; base64 | |
2133 (message "Replacing non-decodable characters with \"%s\"." | |
2134 replacement-chars) | |
2135 (re-search-forward "[^?]+" word-end t) | |
2136 (replace-match replacement-chars)) | |
2137 (re-search-forward "\\?=") | |
2138 (replace-match ""))))) | |
2139 (rfc2047-decode-region (point-min) (point-max)) | |
2140 (buffer-string))))) | |
2141 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2142 ;;; 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
|
2143 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2144 (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
|
2145 "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
|
2146 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
|
2147 `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
|
2148 (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
|
2149 (new) (found)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2150 (setq found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2151 (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2152 (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
|
2153 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
|
2154 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
|
2155 subject)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2156 (if found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2157 (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
|
2158 (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
|
2159 subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2160 (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
|
2161 (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
|
2162 "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
|
2163 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2164 "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
|
2165 "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
|
2166 "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
|
2167 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
|
2168 "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
|
2169 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
|
2170 "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
|
2171 "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
|
2172 )) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2173 new subject) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2174 new)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2175 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2176 ;;; 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
|
2177 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2178 (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
|
2179 "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
|
2180 ;; <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
|
2181 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2182 (list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2183 (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
|
2184 (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
|
2185 (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
|
2186 (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
|
2187 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2188 (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
|
2189 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2190 (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
|
2191 (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
|
2192 (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
|
2193 (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
|
2194 ((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
|
2195 (concat "^[ \t]*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2196 (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
|
2197 " \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2198 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
|
2199 ;; 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
|
2200 (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
|
2201 (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
|
2202 (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
|
2203 (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
|
2204 (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
|
2205 new-subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2206 " (was: " |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2207 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
|
2208 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2209 (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
|
2210 "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
|
2211 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
|
2212 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
|
2213 (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
|
2214 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2215 ;; 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
|
2216 (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
|
2217 (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
|
2218 (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
|
2219 (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
|
2220 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2221 (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
|
2222 "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
|
2223 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
|
2224 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
|
2225 (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
|
2226 ;; 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
|
2227 (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
|
2228 (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
|
2229 (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
|
2230 (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
|
2231 (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
|
2232 (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
|
2233 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2234 (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
|
2235 "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
|
2236 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
|
2237 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
|
2238 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
|
2239 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2240 (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
|
2241 (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
|
2242 (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
|
2243 (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
|
2244 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2245 (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
|
2246 (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
|
2247 (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
|
2248 (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
|
2249 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2250 (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
|
2251 (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
|
2252 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2253 (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
|
2254 "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
|
2255 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
|
2256 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2257 (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
|
2258 (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
|
2259 (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
|
2260 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
|
2261 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
|
2262 (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
|
2263 '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
|
2264 (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
|
2265 (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
|
2266 (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
|
2267 ;; 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
|
2268 (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
|
2269 (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
|
2270 (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
|
2271 nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2272 (replace-match "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2273 ;; 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
|
2274 ;; 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
|
2275 ;; 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
|
2276 (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
|
2277 ;; 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
|
2278 (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
|
2279 ;; 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
|
2280 (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
|
2281 (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
|
2282 (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
|
2283 (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
|
2284 (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
|
2285 (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
|
2286 (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
|
2287 ;; 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
|
2288 ;; 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
|
2289 (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
|
2290 target-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2291 "[ \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2292 (message-fetch-field "Newsgroups"))) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2293 (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
|
2294 (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
|
2295 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2296 (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
|
2297 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 "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
|
2299 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
|
2300 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
|
2301 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
|
2302 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
|
2303 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
|
2304 ;; 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
|
2305 (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
|
2306 (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
|
2307 (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
|
2308 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
|
2309 (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
|
2310 (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
|
2311 (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
|
2312 head t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2313 (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
|
2314 (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
|
2315 (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
|
2316 (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
|
2317 head t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2318 (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
|
2319 ;; 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
|
2320 (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
|
2321 (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
|
2322 (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
|
2323 (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
|
2324 (string-match "^[ \t]*poster[ \t]*$" target-group)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2325 (insert (concat message-followup-to-note target-group "\n")) |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2326 (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
|
2327 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2328 (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
|
2329 "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
|
2330 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
|
2331 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2332 (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
|
2333 (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
|
2334 (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
|
2335 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
|
2336 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
|
2337 (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
|
2338 '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
|
2339 (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
|
2340 (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
|
2341 (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
|
2342 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2343 (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
|
2344 (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
|
2345 (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
|
2346 (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
|
2347 ;; 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
|
2348 (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
|
2349 (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
|
2350 ((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
|
2351 (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
|
2352 (concat "^[ \t]*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2353 (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
|
2354 "[ \t]*$") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2355 old-groups))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2356 ;; 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
|
2357 (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
|
2358 ;; 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
|
2359 (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
|
2360 target-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2361 (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
|
2362 (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
|
2363 (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
|
2364 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
|
2365 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
|
2366 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2367 ;;; 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
|
2368 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2369 (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
|
2370 "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
|
2371 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2372 (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
|
2373 (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
|
2374 (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
|
2375 (bcc nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2376 (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
|
2377 (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
|
2378 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2379 (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
|
2380 (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
|
2381 (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
|
2382 (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
|
2383 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2384 (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
|
2385 (message-delete-line) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
2386 (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
|
2387 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2388 (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
|
2389 (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
|
2390 "bcc" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2391 "cc")))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2392 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2393 ;;; 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
|
2394 |
17493 | 2395 (defun message-remove-header (header &optional is-regexp first reverse) |
2396 "Remove HEADER in the narrowed buffer. | |
35147 | 2397 If IS-REGEXP, HEADER is a regular expression. |
17493 | 2398 If FIRST, only remove the first instance of the header. |
2399 Return the number of headers removed." | |
2400 (goto-char (point-min)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2401 (let ((regexp (if is-regexp header (concat "^" (regexp-quote header) ":"))) |
17493 | 2402 (number 0) |
2403 (case-fold-search t) | |
2404 last) | |
2405 (while (and (not (eobp)) | |
2406 (not last)) | |
2407 (if (if reverse | |
2408 (not (looking-at regexp)) | |
2409 (looking-at regexp)) | |
2410 (progn | |
2411 (incf number) | |
2412 (when first | |
2413 (setq last t)) | |
2414 (delete-region | |
2415 (point) | |
2416 ;; There might be a continuation header, so we have to search | |
2417 ;; until we find a new non-continuation line. | |
2418 (progn | |
2419 (forward-line 1) | |
2420 (if (re-search-forward "^[^ \t]" nil t) | |
2421 (goto-char (match-beginning 0)) | |
2422 (point-max))))) | |
2423 (forward-line 1) | |
2424 (if (re-search-forward "^[^ \t]" nil t) | |
2425 (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
|
2426 (goto-char (point-max))))) |
17493 | 2427 number)) |
2428 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2429 (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
|
2430 "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
|
2431 (let ((count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2432 (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
|
2433 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2434 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2435 (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
|
2436 (incf count))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2437 (while (> count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2438 (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
|
2439 (decf count)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2440 |
17493 | 2441 (defun message-narrow-to-headers () |
2442 "Narrow the buffer to the head of the message." | |
2443 (widen) | |
2444 (narrow-to-region | |
2445 (goto-char (point-min)) | |
2446 (if (re-search-forward | |
2447 (concat "^" (regexp-quote mail-header-separator) "\n") nil t) | |
2448 (match-beginning 0) | |
2449 (point-max))) | |
2450 (goto-char (point-min))) | |
2451 | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2452 (defun message-narrow-to-head-1 () |
35147 | 2453 "Like `message-narrow-to-head'. Don't widen." |
17493 | 2454 (narrow-to-region |
2455 (goto-char (point-min)) | |
2456 (if (search-forward "\n\n" nil 1) | |
2457 (1- (point)) | |
2458 (point-max))) | |
2459 (goto-char (point-min))) | |
2460 | |
100993 | 2461 ;; FIXME: clarify diffference: message-narrow-to-head, |
2462 ;; message-narrow-to-headers-or-head, message-narrow-to-headers | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2463 (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
|
2464 "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
|
2465 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
|
2466 (widen) |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
2467 (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
|
2468 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2469 (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
|
2470 "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
|
2471 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2472 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2473 (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
|
2474 (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
|
2475 (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
|
2476 "\n\\)") |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2477 nil t) |
923182f9ab47
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
Chong Yidong <cyd@stupidchicken.com>
parents:
77819
diff
changeset
|
2478 (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
|
2479 (point-max))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2480 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2481 |
17493 | 2482 (defun message-news-p () |
2483 "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
|
2484 (and (not message-this-is-mail) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2485 (or message-this-is-news |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2486 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2487 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2488 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2489 (and (message-fetch-field "newsgroups") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2490 (not (message-fetch-field "posted-to")))))))) |
17493 | 2491 |
2492 (defun message-mail-p () | |
2493 "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
|
2494 (and (not message-this-is-news) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2495 (or message-this-is-mail |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2496 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2497 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2498 (message-narrow-to-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2499 (or (message-fetch-field "to") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2500 (message-fetch-field "cc") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
2501 (message-fetch-field "bcc"))))))) |
17493 | 2502 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2503 (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
|
2504 "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
|
2505 (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
|
2506 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
|
2507 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
|
2508 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
|
2509 |
17493 | 2510 (defun message-next-header () |
2511 "Go to the beginning of the next header." | |
2512 (beginning-of-line) | |
2513 (or (eobp) (forward-char 1)) | |
2514 (not (if (re-search-forward "^[^ \t]" nil t) | |
2515 (beginning-of-line) | |
2516 (goto-char (point-max))))) | |
2517 | |
2518 (defun message-sort-headers-1 () | |
2519 "Sort the buffer as headers using `message-rank' text props." | |
2520 (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
|
2521 (require 'sort) |
17493 | 2522 (sort-subr |
2523 nil 'message-next-header | |
2524 (lambda () | |
2525 (message-next-header) | |
2526 (unless (bobp) | |
2527 (forward-char -1))) | |
2528 (lambda () | |
2529 (or (get-text-property (point) 'message-rank) | |
2530 10000)))) | |
2531 | |
2532 (defun message-sort-headers () | |
2533 "Sort the headers of the current message according to `message-header-format-alist'." | |
2534 (interactive) | |
2535 (save-excursion | |
2536 (save-restriction | |
2537 (let ((max (1+ (length message-header-format-alist))) | |
2538 rank) | |
2539 (message-narrow-to-headers) | |
2540 (while (re-search-forward "^[^ \n]+:" nil t) | |
2541 (put-text-property | |
2542 (match-beginning 0) (1+ (match-beginning 0)) | |
2543 'message-rank | |
2544 (if (setq rank (length (memq (assq (intern (buffer-substring | |
2545 (match-beginning 0) | |
2546 (1- (match-end 0)))) | |
2547 message-header-format-alist) | |
2548 message-header-format-alist))) | |
2549 (- max rank) | |
2550 (1+ max))))) | |
2551 (message-sort-headers-1)))) | |
2552 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2553 (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
|
2554 "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
|
2555 (interactive) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2556 (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
|
2557 (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
|
2558 (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
|
2559 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2560 |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
2561 (autoload 'Info-goto-node "info") |
93451
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2562 (defvar mml2015-use) |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
2563 |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2564 (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
|
2565 "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
|
2566 |
93386 | 2567 Prefixed with one \\[universal-argument], display the Emacs MIME |
2568 manual. With two \\[universal-argument]'s, display the EasyPG or | |
2569 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
|
2570 (interactive "p") |
106548
4a940e6bbe88
(message-info): Explain why we use `Info-goto-node'.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
106372
diff
changeset
|
2571 ;; Don't use `info' because support for `(filename)nodename' is not |
4a940e6bbe88
(message-info): Explain why we use `Info-goto-node'.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
106372
diff
changeset
|
2572 ;; available in XEmacs < 21.5.12. |
93386 | 2573 (Info-goto-node (format "(%s)Top" |
93451
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2574 (cond ((eq arg 16) |
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2575 (require 'mml2015) |
06240ef0da8e
(mml2015-use): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
93394
diff
changeset
|
2576 mml2015-use) |
93386 | 2577 ((eq arg 4) 'emacs-mime) |
2578 ;; `booleanp' only available in Emacs 22+ | |
2579 ((and (not (memq arg '(nil t))) | |
2580 (symbolp arg)) | |
2581 arg) | |
2582 (t | |
2583 'message))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2584 |
17493 | 2585 |
2586 | |
2587 ;;; | |
2588 ;;; Message mode | |
2589 ;;; | |
2590 | |
2591 ;;; Set up keymap. | |
2592 | |
2593 (defvar message-mode-map nil) | |
2594 | |
2595 (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
|
2596 (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
|
2597 (set-keymap-parent message-mode-map text-mode-map) |
17493 | 2598 (define-key message-mode-map "\C-c?" 'describe-mode) |
2599 | |
2600 (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
|
2601 (define-key message-mode-map "\C-c\C-f\C-o" 'message-goto-from) |
17493 | 2602 (define-key message-mode-map "\C-c\C-f\C-b" 'message-goto-bcc) |
2603 (define-key message-mode-map "\C-c\C-f\C-w" 'message-goto-fcc) | |
2604 (define-key message-mode-map "\C-c\C-f\C-c" 'message-goto-cc) | |
2605 (define-key message-mode-map "\C-c\C-f\C-s" 'message-goto-subject) | |
2606 (define-key message-mode-map "\C-c\C-f\C-r" 'message-goto-reply-to) | |
2607 (define-key message-mode-map "\C-c\C-f\C-n" 'message-goto-newsgroups) | |
2608 (define-key message-mode-map "\C-c\C-f\C-d" 'message-goto-distribution) | |
2609 (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
|
2610 (define-key message-mode-map "\C-c\C-f\C-m" 'message-goto-mail-followup-to) |
17493 | 2611 (define-key message-mode-map "\C-c\C-f\C-k" 'message-goto-keywords) |
2612 (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
|
2613 (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
|
2614 '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
|
2615 (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
|
2616 '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
|
2617 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2618 ;; 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
|
2619 (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
|
2620 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2621 (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
|
2622 ;; 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
|
2623 (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
|
2624 (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
|
2625 ;; 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
|
2626 (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
|
2627 (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
|
2628 |
17493 | 2629 (define-key message-mode-map "\C-c\C-b" 'message-goto-body) |
2630 (define-key message-mode-map "\C-c\C-i" 'message-goto-signature) | |
2631 | |
2632 (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
|
2633 (define-key message-mode-map "\C-c\C-fw" 'message-insert-wide-reply) |
17493 | 2634 (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
|
2635 (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
|
2636 (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
|
2637 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2638 (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
|
2639 (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
|
2640 'message-insert-disposition-notification-to) |
17493 | 2641 |
2642 (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
|
2643 (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer) |
17493 | 2644 (define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message) |
2645 (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
|
2646 (define-key message-mode-map "\C-c\M-h" 'message-insert-headers) |
17493 | 2647 (define-key message-mode-map "\C-c\C-r" 'message-caesar-buffer-body) |
2648 (define-key message-mode-map "\C-c\C-o" 'message-sort-headers) | |
2649 (define-key message-mode-map "\C-c\M-r" 'message-rename-buffer) | |
2650 | |
2651 (define-key message-mode-map "\C-c\C-c" 'message-send-and-exit) | |
2652 (define-key message-mode-map "\C-c\C-s" 'message-send) | |
2653 (define-key message-mode-map "\C-c\C-k" 'message-kill-buffer) | |
2654 (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
|
2655 (define-key message-mode-map "\C-c\n" 'gnus-delay-article) |
17493 | 2656 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2657 (define-key message-mode-map "\C-c\M-k" 'message-kill-address) |
17493 | 2658 (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
|
2659 (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
|
2660 (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
|
2661 (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
|
2662 (define-key message-mode-map [remap split-line] 'message-split-line) |
17493 | 2663 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2664 (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
|
2665 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2666 (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
|
2667 (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
|
2668 (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
|
2669 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2670 (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
|
2671 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2672 (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
|
2673 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
|
2674 `("Message" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2675 ["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
|
2676 ["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
|
2677 ["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
|
2678 ["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
|
2679 ["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
|
2680 ["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
|
2681 :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
|
2682 ,@(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
|
2683 '(: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
|
2684 ["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
|
2685 :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
|
2686 ,@(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
|
2687 '(: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
|
2688 ["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
|
2689 ["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
|
2690 ["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
|
2691 ["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
|
2692 ,@(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
|
2693 '(: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
|
2694 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2695 ["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
|
2696 :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
|
2697 ,@(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
|
2698 '(: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
|
2699 ["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
|
2700 ,@(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
|
2701 '(: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
|
2702 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2703 ["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
|
2704 ,@(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
|
2705 '(: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
|
2706 ["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
|
2707 ,@(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
|
2708 '(: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
|
2709 ["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
|
2710 ,@(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
|
2711 '(: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
|
2712 ["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
|
2713 ,@(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
|
2714 '(: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
|
2715 "----" |
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
67032
diff
changeset
|
2716 ["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
|
2717 ,@(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
|
2718 '(:help "Display the Message manual"))])) |
17493 | 2719 |
2720 (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
|
2721 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
|
2722 `("Field" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2723 ["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
|
2724 ["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
|
2725 ["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
|
2726 ["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
|
2727 ["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
|
2728 ["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
|
2729 ["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
|
2730 ["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
|
2731 ["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
|
2732 ,@(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
|
2733 '(: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
|
2734 ["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
|
2735 ,@(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
|
2736 '(: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
|
2737 ["Request Receipt" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2738 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
|
2739 ,@(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
|
2740 '(: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
|
2741 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2742 ;; (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
|
2743 ["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
|
2744 ["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
|
2745 ["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
|
2746 ["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
|
2747 ["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
|
2748 ;; ["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
|
2749 ["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
|
2750 ["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
|
2751 ["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
|
2752 ["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
|
2753 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2754 ;; (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
|
2755 ["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
|
2756 ,@(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
|
2757 '(: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
|
2758 ["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
|
2759 ,@(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
|
2760 '(:help |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2761 "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
|
2762 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2763 ["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
|
2764 ["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
|
2765 ["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
|
2766 ,@(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
|
2767 '(: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
|
2768 ["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
|
2769 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2770 ["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
|
2771 ["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
|
2772 ;; 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
|
2773 ["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
|
2774 ["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
|
2775 ["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
|
2776 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2777 (defvar message-tool-bar-map nil) |
17493 | 2778 |
86154 | 2779 (defvar facemenu-add-face-function) |
2780 (defvar facemenu-remove-face-function) | |
17493 | 2781 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2782 ;;; Forbidden properties |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2783 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2784 ;; We use `after-change-functions' to keep special text properties |
107157
6a11e3b311d8
Change a custom default to ease the mail->message transition.
Glenn Morris <rgm@gnu.org>
parents:
106892
diff
changeset
|
2785 ;; that interfere with the normal function of message mode out of the |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2786 ;; buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2787 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2788 (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
|
2789 "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
|
2790 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2791 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
|
2792 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
|
2793 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
|
2794 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
|
2795 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
|
2796 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
|
2797 :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
|
2798 :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
|
2799 :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
|
2800 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2801 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2802 (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
|
2803 ;; 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
|
2804 ;; 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
|
2805 ;; 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
|
2806 '(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
|
2807 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
|
2808 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
|
2809 ;; 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
|
2810 ;; 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
|
2811 ;; 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
|
2812 ;; 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
|
2813 ;; 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
|
2814 "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
|
2815 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
|
2816 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2817 (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
|
2818 "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
|
2819 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
|
2820 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
|
2821 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
|
2822 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
|
2823 (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
|
2824 (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
|
2825 (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
|
2826 '(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
|
2827 (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
|
2828 (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
|
2829 (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
|
2830 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2831 (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
|
2832 (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
|
2833 (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
|
2834 (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
|
2835 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2836 (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
|
2837 "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
|
2838 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
|
2839 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
|
2840 (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
|
2841 (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
|
2842 (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
|
2843 (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
|
2844 (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
|
2845 (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
|
2846 (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
|
2847 (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
|
2848 |
17493 | 2849 ;;;###autoload |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2850 (define-derived-mode message-mode text-mode "Message" |
17493 | 2851 "Major mode for editing mail and news to be sent. |
35147 | 2852 Like Text Mode but with these additional commands:\\<message-mode-map> |
2853 C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' | |
2854 C-c C-d Postpone sending the message C-c C-k Kill the message | |
17493 | 2855 C-c C-f move to a header field (and create it if there isn't): |
2856 C-c C-f C-t move to To C-c C-f C-s move to Subject | |
2857 C-c C-f C-c move to Cc C-c C-f C-b move to Bcc | |
2858 C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To | |
2859 C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups | |
2860 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
|
2861 C-c C-f C-o move to From (\"Originator\") |
17493 | 2862 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
|
2863 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
|
2864 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
|
2865 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
|
2866 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
|
2867 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
|
2868 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
|
2869 C-c C-f a Insert X-No-Archive: header and a note in the body |
35147 | 2870 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
|
2871 C-c C-l `message-to-list-only' (removes all but list address in to/cc) |
35147 | 2872 C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) |
2873 C-c C-b `message-goto-body' (move to beginning of message text). | |
2874 C-c C-i `message-goto-signature' (move to the beginning of the signature). | |
2875 C-c C-w `message-insert-signature' (insert `message-signature-file' file). | |
2876 C-c C-y `message-yank-original' (insert current message, if any). | |
2877 C-c C-q `message-fill-yanked-message' (fill what was yanked). | |
2878 C-c C-e `message-elide-region' (elide the text between point and mark). | |
2879 C-c C-v `message-delete-not-region' (remove the text outside the region). | |
2880 C-c C-z `message-kill-to-signature' (kill the text up to the signature). | |
2881 C-c C-r `message-caesar-buffer-body' (rot13 the message body). | |
2882 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
|
2883 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
|
2884 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
|
2885 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
|
2886 C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). |
35147 | 2887 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
|
2888 (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
|
2889 (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
|
2890 (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
|
2891 (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
|
2892 (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
|
2893 (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
|
2894 (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
|
2895 (set (make-local-variable 'message-draft-article) nil) |
17493 | 2896 (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
|
2897 (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
|
2898 (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
|
2899 (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
|
2900 (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
|
2901 (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
|
2902 (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
|
2903 "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2904 (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
|
2905 (set (make-local-variable 'message-reply-headers) nil) |
17493 | 2906 (make-local-variable 'message-newsreader) |
2907 (make-local-variable 'message-mailer) | |
2908 (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
|
2909 (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
|
2910 (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
|
2911 (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
|
2912 (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
|
2913 (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
|
2914 (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
|
2915 (turn-on-auto-fill)) |
34766 | 2916 ;; 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
|
2917 ;; (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
|
2918 (when message-yank-prefix |
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2919 (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
|
2920 (set (make-local-variable 'comment-start-skip) |
5284e720208b
(message-mode): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54277
diff
changeset
|
2921 (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
|
2922 (if (featurep 'xemacs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2923 (message-setup-toolbar) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2924 (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
|
2925 '(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
|
2926 (if (boundp 'tool-bar-map) |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
2927 (set (make-local-variable 'tool-bar-map) (message-make-tool-bar)))) |
17493 | 2928 (easy-menu-add message-mode-menu message-mode-map) |
2929 (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
|
2930 (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
|
2931 ;; 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
|
2932 (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
|
2933 nil 'local) |
17493 | 2934 ;; 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
|
2935 (cond |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
2936 ((message-mail-alias-type-p 'abbrev) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2937 (if (fboundp 'mail-abbrevs-setup) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
2938 (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
|
2939 (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
|
2940 (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
|
2941 ((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
|
2942 (ecomplete-setup))) |
44075
7782e54757bb
* mail-source.el (make-source-make-complex-temp-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43075
diff
changeset
|
2943 (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
|
2944 (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
|
2945 (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
|
2946 ;; 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
|
2947 ;; 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
|
2948 (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
|
2949 (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
|
2950 (mml-mode)) |
17493 | 2951 |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2952 (defun message-setup-fill-variables () |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2953 "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
|
2954 (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
|
2955 'message-fill-paragraph) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2956 (make-local-variable 'paragraph-separate) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2957 (make-local-variable 'paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2958 (make-local-variable 'adaptive-fill-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2959 (unless (boundp 'adaptive-fill-first-line-regexp) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2960 (setq adaptive-fill-first-line-regexp nil)) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2961 (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
|
2962 (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
|
2963 ;; 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
|
2964 ;; 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
|
2965 (concat "\\(" message-cite-prefix-regexp "\\)[ \t]*"))) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2966 (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
|
2967 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2968 (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
|
2969 "[ \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
|
2970 "-- $\\|" ; signature delimiter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2971 "---+$\\|" ; 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
|
2972 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
|
2973 ".*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
|
2974 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
|
2975 ; mml tags |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
2976 "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)")) |
33436
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2977 (setq paragraph-separate paragraph-start) |
a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
Dave Love <fx@gnu.org>
parents:
33400
diff
changeset
|
2978 (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
|
2979 (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
|
2980 (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
|
2981 (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
|
2982 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
|
2983 (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
|
2984 ;;(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
|
2985 (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
|
2986 (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
|
2987 (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
|
2988 ;; 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
|
2989 ;; 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
|
2990 ;; 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
|
2991 ;; `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
|
2992 ;; -- 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
|
2993 ;; 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
|
2994 ;; 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
|
2995 (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
|
2996 (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
|
2997 |
17493 | 2998 |
2999 | |
3000 ;;; | |
3001 ;;; Message mode commands | |
3002 ;;; | |
3003 | |
3004 ;;; Movement commands | |
3005 | |
3006 (defun message-goto-to () | |
3007 "Move point to the To header." | |
3008 (interactive) | |
3009 (message-position-on-field "To")) | |
3010 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3011 (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
|
3012 "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
|
3013 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3014 (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
|
3015 |
17493 | 3016 (defun message-goto-subject () |
3017 "Move point to the Subject header." | |
3018 (interactive) | |
3019 (message-position-on-field "Subject")) | |
3020 | |
3021 (defun message-goto-cc () | |
3022 "Move point to the Cc header." | |
3023 (interactive) | |
3024 (message-position-on-field "Cc" "To")) | |
3025 | |
3026 (defun message-goto-bcc () | |
3027 "Move point to the Bcc header." | |
3028 (interactive) | |
3029 (message-position-on-field "Bcc" "Cc" "To")) | |
3030 | |
3031 (defun message-goto-fcc () | |
3032 "Move point to the Fcc header." | |
3033 (interactive) | |
3034 (message-position-on-field "Fcc" "To" "Newsgroups")) | |
3035 | |
3036 (defun message-goto-reply-to () | |
3037 "Move point to the Reply-To header." | |
3038 (interactive) | |
3039 (message-position-on-field "Reply-To" "Subject")) | |
3040 | |
3041 (defun message-goto-newsgroups () | |
3042 "Move point to the Newsgroups header." | |
3043 (interactive) | |
3044 (message-position-on-field "Newsgroups")) | |
3045 | |
3046 (defun message-goto-distribution () | |
3047 "Move point to the Distribution header." | |
3048 (interactive) | |
3049 (message-position-on-field "Distribution")) | |
3050 | |
3051 (defun message-goto-followup-to () | |
3052 "Move point to the Followup-To header." | |
3053 (interactive) | |
3054 (message-position-on-field "Followup-To" "Newsgroups")) | |
3055 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3056 (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
|
3057 "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
|
3058 (interactive) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57561
diff
changeset
|
3059 (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
|
3060 |
17493 | 3061 (defun message-goto-keywords () |
3062 "Move point to the Keywords header." | |
3063 (interactive) | |
3064 (message-position-on-field "Keywords" "Subject")) | |
3065 | |
3066 (defun message-goto-summary () | |
3067 "Move point to the Summary header." | |
3068 (interactive) | |
3069 (message-position-on-field "Summary" "Subject")) | |
3070 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3071 (defun message-goto-body (&optional interactivep) |
17493 | 3072 "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
|
3073 (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
|
3074 (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
|
3075 (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
|
3076 (expand-abbrev)) |
17493 | 3077 (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
|
3078 (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
|
3079 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))) |
17493 | 3080 |
70245
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3081 (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
|
3082 "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
|
3083 (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
|
3084 (>= (point) body))) |
322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Miles Bader <miles@gnu.org>
parents:
70051
diff
changeset
|
3085 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3086 (defun message-goto-eoh () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3087 "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
|
3088 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3089 (message-goto-body) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3090 (forward-line -1)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3091 |
17493 | 3092 (defun message-goto-signature () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3093 "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
|
3094 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
|
3095 return nil." |
17493 | 3096 (interactive) |
3097 (goto-char (point-min)) | |
3098 (if (re-search-forward message-signature-separator nil t) | |
3099 (forward-line 1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3100 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3101 nil)) |
17493 | 3102 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3103 (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
|
3104 "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
|
3105 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
|
3106 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
|
3107 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
|
3108 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
|
3109 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
|
3110 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3111 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
|
3112 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
|
3113 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3114 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3115 (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
|
3116 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3117 (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
|
3118 (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
|
3119 (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
|
3120 (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
|
3121 (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
|
3122 (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
|
3123 (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
|
3124 (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
|
3125 |
17493 | 3126 |
3127 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3128 (defun message-insert-to (&optional force) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3129 "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
|
3130 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
|
3131 prefix FORCE is given." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
3132 (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
|
3133 (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
|
3134 (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
|
3135 (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
|
3136 (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
|
3137 (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
|
3138 (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
|
3139 (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
|
3140 (message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3141 (if force |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3142 "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
|
3143 "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
|
3144 (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
|
3145 (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
|
3146 (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
|
3147 (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
|
3148 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3149 (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
|
3150 "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
|
3151 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3152 (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
|
3153 (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
|
3154 (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
|
3155 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3156 (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
|
3157 '((To Cc Bcc) |
a87e26272828
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-210
Miles Bader <miles@gnu.org>
parents:
69572
diff
changeset
|
3158 (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
|
3159 "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
|
3160 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
|
3161 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
|
3162 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
|
3163 :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
|
3164 :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
|
3165 :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
|
3166 :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
|
3167 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3168 (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
|
3169 "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
|
3170 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
|
3171 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
|
3172 ;; 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
|
3173 ;; 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
|
3174 ;; `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
|
3175 ;; (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
|
3176 (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
|
3177 (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
|
3178 (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
|
3179 (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
|
3180 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
|
3181 (old-header |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3182 (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
|
3183 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
|
3184 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
|
3185 return synonym))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3186 (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
|
3187 (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
|
3188 (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
|
3189 (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
|
3190 (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
|
3191 (insert ", ")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3192 (insert new-header))))) |
17493 | 3193 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3194 (defun message-widen-reply () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3195 "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
|
3196 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3197 (let ((follow-to |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3198 (and (bufferp message-reply-buffer) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3199 (buffer-name message-reply-buffer) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3200 (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
|
3201 (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
|
3202 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3203 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3204 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3205 (dolist (elem follow-to) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3206 (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
|
3207 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3208 (insert (symbol-name (car elem)) ": " |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3209 (cdr elem) "\n")))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3210 |
17493 | 3211 (defun message-insert-newsgroups () |
3212 "Insert the Newsgroups header from the article being replied to." | |
3213 (interactive) | |
3214 (when (and (message-position-on-field "Newsgroups") | |
3215 (mail-fetch-field "newsgroups") | |
3216 (not (string-match "\\` *\\'" (mail-fetch-field "newsgroups")))) | |
3217 (insert ",")) | |
3218 (insert (or (message-fetch-reply-field "newsgroups") ""))) | |
3219 | |
3220 | |
3221 | |
3222 ;;; Various commands | |
3223 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3224 (defun message-delete-not-region (beg end) |
35147 | 3225 "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
|
3226 (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
|
3227 (let (citeprefix) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3228 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3229 (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
|
3230 ;; 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
|
3231 (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
|
3232 (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
|
3233 (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
|
3234 (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
|
3235 (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
|
3236 (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3237 (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
|
3238 (point))) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3239 (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
|
3240 (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
|
3241 (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
|
3242 (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
|
3243 (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3244 (when citeprefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3245 (insert citeprefix)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3246 (when (message-goto-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3247 (forward-line -2))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3248 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3249 (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
|
3250 "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
|
3251 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
|
3252 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
|
3253 (interactive "P") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3254 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3255 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3256 (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
|
3257 (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
|
3258 (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
|
3259 (unless (eobp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3260 (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
|
3261 (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
|
3262 (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
|
3263 (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
|
3264 (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
|
3265 (unless (bolp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3266 (insert "\n"))))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3267 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3268 (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
|
3269 "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
|
3270 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
|
3271 (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
|
3272 (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
|
3273 (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
|
3274 (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
|
3275 (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
|
3276 (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
|
3277 ;; 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
|
3278 (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
|
3279 (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
|
3280 (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
|
3281 (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
|
3282 (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
|
3283 ;; 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
|
3284 (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
|
3285 (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
|
3286 (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
|
3287 (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
|
3288 (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
|
3289 (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
|
3290 (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
|
3291 (not bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3292 (< (- 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
|
3293 ;; 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
|
3294 (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
|
3295 end nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3296 (if quoted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3297 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3298 (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
|
3299 (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
|
3300 (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
|
3301 (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
|
3302 (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
|
3303 (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
|
3304 (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
|
3305 (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
|
3306 (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
|
3307 (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
|
3308 (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
|
3309 (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
|
3310 (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
|
3311 (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
|
3312 (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
|
3313 (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
|
3314 (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
|
3315 (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
|
3316 (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
|
3317 (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
|
3318 (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
|
3319 (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
|
3320 (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
|
3321 (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
|
3322 (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
|
3323 (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
|
3324 (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
|
3325 (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
|
3326 (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
|
3327 (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
|
3328 (setq beg (point)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3329 (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
|
3330 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3331 (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
|
3332 (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
|
3333 (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
|
3334 (if bolp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3335 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3336 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3337 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3338 (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
|
3339 ;; (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
|
3340 ;; 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
|
3341 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3342 (newline) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3343 (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
|
3344 (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
|
3345 (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
|
3346 (undo-boundary) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3347 (if quoted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3348 (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
|
3349 (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
|
3350 (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
|
3351 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
|
3352 (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
|
3353 (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
|
3354 (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
|
3355 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3356 (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
|
3357 "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
|
3358 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
|
3359 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
|
3360 (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
|
3361 (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
|
3362 nil |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3363 (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
|
3364 (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
|
3365 (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
|
3366 t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3367 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3368 (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
|
3369 "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
|
3370 (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
|
3371 (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
|
3372 (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
|
3373 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3374 (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
|
3375 "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
|
3376 (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
|
3377 (do-auto-fill))) |
49034
b6e082e00b00
(message-split-line): New function.
Kim F. Storm <storm@cua.dk>
parents:
48588
diff
changeset
|
3378 |
17493 | 3379 (defun message-insert-signature (&optional force) |
35147 | 3380 "Insert a signature. See documentation for variable `message-signature'." |
17493 | 3381 (interactive (list 0)) |
3382 (let* ((signature | |
3383 (cond | |
3384 ((and (null message-signature) | |
3385 (eq force 0)) | |
3386 (save-excursion | |
3387 (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
|
3388 (not (re-search-backward message-signature-separator nil t)))) |
17493 | 3389 ((and (null message-signature) |
3390 force) | |
3391 t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3392 ((functionp message-signature) |
17493 | 3393 (funcall message-signature)) |
3394 ((listp message-signature) | |
3395 (eval message-signature)) | |
3396 (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
|
3397 signature-file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3398 (setq signature |
17493 | 3399 (cond ((stringp signature) |
3400 signature) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3401 ((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
|
3402 (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
|
3403 (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
|
3404 ;; 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
|
3405 ;; 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
|
3406 (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
|
3407 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
|
3408 (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
|
3409 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
|
3410 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
|
3411 (file-exists-p signature-file)))) |
17493 | 3412 (when signature |
3413 (goto-char (point-max)) | |
3414 ;; Insert the signature. | |
3415 (unless (bolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3416 (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
|
3417 (when message-signature-insert-empty-line |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3418 (insert "\n")) |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3419 (insert "-- \n") |
17493 | 3420 (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
|
3421 (insert-file-contents signature-file) |
17493 | 3422 (insert signature)) |
3423 (goto-char (point-max)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3424 (or (bolp) (insert "\n"))))) |
17493 | 3425 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3426 (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
|
3427 "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
|
3428 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3429 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3430 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3431 (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
|
3432 (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
|
3433 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3434 (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
|
3435 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3436 (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
|
3437 "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
|
3438 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3439 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3440 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3441 (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
|
3442 (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
|
3443 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3444 (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
|
3445 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3446 (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
|
3447 "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
|
3448 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
|
3449 and `low'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3450 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3451 (save-excursion |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3452 (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
|
3453 cur) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3454 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3455 (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
|
3456 (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
|
3457 (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
|
3458 (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
|
3459 "low") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3460 ((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
|
3461 "normal") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3462 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3463 "high"))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3464 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3465 (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
|
3466 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3467 (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
|
3468 "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
|
3469 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
|
3470 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3471 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3472 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3473 (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
|
3474 (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
|
3475 (message-goto-eoh) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3476 (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
|
3477 (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
|
3478 (message-field-value "From") |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3479 (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
|
3480 |
17493 | 3481 (defun message-elide-region (b e) |
35147 | 3482 "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
|
3483 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
|
3484 text was killed." |
17493 | 3485 (interactive "r") |
3486 (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
|
3487 (insert message-elide-ellipsis)) |
17493 | 3488 |
3489 (defvar message-caesar-translation-table nil) | |
3490 | |
3491 (defun message-caesar-region (b e &optional n) | |
35147 | 3492 "Caesar rotate region B to E by N, default 13, for decrypting netnews." |
17493 | 3493 (interactive |
3494 (list | |
3495 (min (point) (or (mark t) (point))) | |
3496 (max (point) (or (mark t) (point))) | |
3497 (when current-prefix-arg | |
3498 (prefix-numeric-value current-prefix-arg)))) | |
3499 | |
3500 (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
|
3501 (unless (or (zerop n) ; no action needed for a rot of 0 |
17493 | 3502 (= b e)) ; no region to rotate |
3503 ;; We build the table, if necessary. | |
3504 (when (or (not message-caesar-translation-table) | |
3505 (/= (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
|
3506 (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
|
3507 (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
|
3508 (translate-region b e message-caesar-translation-table))) |
17493 | 3509 |
3510 (defun message-make-caesar-translation-table (n) | |
3511 "Create a rot table with offset N." | |
3512 (let ((i -1) | |
3513 (table (make-string 256 0))) | |
3514 (while (< (incf i) 256) | |
3515 (aset table i i)) | |
3516 (concat | |
3517 (substring table 0 ?A) | |
3518 (substring table (+ ?A n) (+ ?A n (- 26 n))) | |
3519 (substring table ?A (+ ?A n)) | |
3520 (substring table (+ ?A 26) ?a) | |
3521 (substring table (+ ?a n) (+ ?a n (- 26 n))) | |
3522 (substring table ?a (+ ?a n)) | |
3523 (substring table (+ ?a 26) 255)))) | |
3524 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3525 (defun message-caesar-buffer-body (&optional rotnum wide) |
35147 | 3526 "Caesar rotate all letters in the current buffer by 13 places. |
3527 Used to encode/decode possibly offensive messages (commonly in rec.humor). | |
17493 | 3528 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
|
3529 Mail and USENET news headers are not rotated unless WIDE is non-nil." |
17493 | 3530 (interactive (if current-prefix-arg |
3531 (list (prefix-numeric-value current-prefix-arg)) | |
3532 (list nil))) | |
3533 (save-excursion | |
3534 (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
|
3535 (when (and (not wide) (message-goto-body)) |
17493 | 3536 (narrow-to-region (point) (point-max))) |
3537 (message-caesar-region (point-min) (point-max) rotnum)))) | |
3538 | |
3539 (defun message-pipe-buffer-body (program) | |
3540 "Pipe the message body in the current buffer through PROGRAM." | |
3541 (save-excursion | |
3542 (save-restriction | |
3543 (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
|
3544 (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
|
3545 (shell-command-on-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3546 (point-min) (point-max) program nil t)))) |
17493 | 3547 |
3548 (defun message-rename-buffer (&optional enter-string) | |
3549 "Rename the *message* buffer to \"*message* RECIPIENT\". | |
3550 If the function is run with a prefix, it will ask for a new buffer | |
3551 name, rather than giving an automatic name." | |
3552 (interactive "Pbuffer name: ") | |
3553 (save-excursion | |
3554 (save-restriction | |
3555 (goto-char (point-min)) | |
3556 (narrow-to-region (point) | |
3557 (search-forward mail-header-separator nil 'end)) | |
3558 (let* ((mail-to (or | |
3559 (if (message-news-p) (message-fetch-field "Newsgroups") | |
3560 (message-fetch-field "To")) | |
3561 "")) | |
3562 (mail-trimmed-to | |
3563 (if (string-match "," mail-to) | |
3564 (concat (substring mail-to 0 (match-beginning 0)) ", ...") | |
3565 mail-to)) | |
3566 (name-default (concat "*message* " mail-trimmed-to)) | |
3567 (name (if enter-string | |
3568 (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
|
3569 name-default))) |
17493 | 3570 (rename-buffer name t))))) |
3571 | |
3572 (defun message-fill-yanked-message (&optional justifyp) | |
3573 "Fill the paragraphs of a message yanked into this one. | |
3574 Numeric argument means justify as well." | |
3575 (interactive "P") | |
3576 (save-excursion | |
3577 (goto-char (point-min)) | |
3578 (search-forward (concat "\n" mail-header-separator "\n") nil t) | |
3579 (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
|
3580 (fill-individual-paragraphs (point) (point-max) justifyp)))) |
17493 | 3581 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3582 (defun message-indent-citation (&optional start end yank-only) |
17493 | 3583 "Modify text just inserted from a message to be cited. |
3584 The inserted text should be the region. | |
3585 When this function returns, the region is again around the modified text. | |
3586 | |
3587 Normally, indent each nonblank line `message-indentation-spaces' spaces. | |
3588 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
|
3589 (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
|
3590 (unless yank-only |
17493 | 3591 ;; Remove unwanted headers. |
3592 (when message-ignored-cited-headers | |
3593 (let (all-removed) | |
3594 (save-restriction | |
3595 (narrow-to-region | |
3596 (goto-char start) | |
3597 (if (search-forward "\n\n" nil t) | |
3598 (1- (point)) | |
3599 (point))) | |
3600 (message-remove-header message-ignored-cited-headers t) | |
3601 (when (= (point-min) (point-max)) | |
3602 (setq all-removed t)) | |
3603 (goto-char (point-max))) | |
3604 (if all-removed | |
3605 (goto-char start) | |
3606 (forward-line 1)))) | |
3607 ;; Delete blank lines at the start of the buffer. | |
3608 (while (and (point-min) | |
3609 (eolp) | |
3610 (not (eobp))) | |
3611 (message-delete-line)) | |
3612 ;; Delete blank lines at the end of the buffer. | |
3613 (goto-char (point-max)) | |
3614 (unless (eolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3615 (insert "\n")) |
17493 | 3616 (while (and (zerop (forward-line -1)) |
3617 (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
|
3618 (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
|
3619 ;; 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
|
3620 (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
|
3621 (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
|
3622 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3623 (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
|
3624 (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
|
3625 (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
|
3626 (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
|
3627 ((looking-at "^$") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3628 (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
|
3629 (t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3630 (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
|
3631 (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
|
3632 (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
|
3633 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3634 (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
|
3635 "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
|
3636 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
|
3637 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3638 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
|
3639 `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
|
3640 (interactive "P") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3641 (let ((citexp |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3642 (concat |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3643 "^\\(" |
85809 | 3644 (when (boundp 'message-yank-cited-prefix) |
3645 (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
|
3646 message-yank-prefix |
85809 | 3647 "\\)+ *\n" |
3648 ))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3649 (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
|
3650 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3651 (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
|
3652 (while (re-search-forward citexp nil t) |
85809 | 3653 (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
|
3654 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3655 (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
|
3656 "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
|
3657 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3658 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
|
3659 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
|
3660 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
|
3661 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3662 (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
|
3663 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3664 This variable has no effect in news postings.") |
17493 | 3665 |
3666 (defun message-yank-original (&optional arg) | |
3667 "Insert the message being replied to, if any. | |
3668 Puts point before the text and mark after. | |
3669 Normally indents each nonblank line ARG spaces (default 3). However, | |
3670 if `message-yank-prefix' is non-nil, insert that prefix on each line. | |
3671 | |
3672 This function uses `message-cite-function' to do the actual citing. | |
3673 | |
3674 Just \\[universal-argument] as argument means don't indent, insert no | |
3675 prefix, and don't delete any headers." | |
3676 (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
|
3677 (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
|
3678 body-text) |
17493 | 3679 (when (and message-reply-buffer |
3680 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
|
3681 (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
|
3682 (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
|
3683 (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
|
3684 (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
|
3685 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
|
3686 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
|
3687 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3688 (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
|
3689 (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
|
3690 (point-max))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3691 (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
|
3692 (set (make-local-variable 'message-cite-reply-above) nil))) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3693 (if (bufferp message-reply-buffer) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3694 (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
|
3695 (push-mark (save-excursion |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3696 (cond |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3697 ((bufferp message-reply-buffer) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3698 (insert-buffer-substring message-reply-buffer)) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3699 ((and (consp message-reply-buffer) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3700 (functionp (car message-reply-buffer))) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3701 (apply (car message-reply-buffer) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
3702 (cdr message-reply-buffer)))) |
77114 | 3703 (unless (bolp) |
3704 (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
|
3705 (point))) |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35147
diff
changeset
|
3706 (unless arg |
77114 | 3707 (funcall message-cite-function) |
3708 (unless (eq (char-before (mark t)) ?\n) | |
3709 (let ((pt (point))) | |
3710 (goto-char (mark t)) | |
3711 (insert-before-markers ?\n) | |
3712 (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
|
3713 (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
|
3714 (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
|
3715 (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
|
3716 (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
|
3717 (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
|
3718 ;; 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
|
3719 ;; Add `gnus-article-highlight-citation' here? |
17493 | 3720 (unless modified |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3721 (setq message-checksum (message-checksum)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3722 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3723 (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
|
3724 "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
|
3725 (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
|
3726 (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
|
3727 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3728 (message-yank-original)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3729 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3730 (defun message-buffers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3731 "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
|
3732 (let (buffers) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
3733 (save-current-buffer |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3734 (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
|
3735 (set-buffer buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3736 (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
|
3737 (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
|
3738 (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
|
3739 (nreverse buffers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3740 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3741 (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
|
3742 "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
|
3743 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
|
3744 original message. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3745 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3746 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
|
3747 (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
|
3748 mail-citation-hook) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3749 (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
|
3750 (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
|
3751 (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
|
3752 (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
|
3753 (functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3754 (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
|
3755 (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
|
3756 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
|
3757 (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
|
3758 ;; 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
|
3759 ;; 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
|
3760 ;; 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
|
3761 (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
|
3762 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3763 (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
|
3764 (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
|
3765 (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
|
3766 (vector 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
3767 (or (message-fetch-field "subject") "none") |
73007 | 3768 (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
|
3769 (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
|
3770 (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
|
3771 (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
|
3772 0 0 "")))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3773 (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
|
3774 (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
|
3775 ;; Allow undoing. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3776 (undo-boundary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3777 (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
|
3778 (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
|
3779 ;; 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
|
3780 (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
|
3781 (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
|
3782 (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
|
3783 (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
|
3784 (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
|
3785 (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
|
3786 ;; 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
|
3787 (insert "\n")))) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3788 (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
|
3789 (mapc 'funcall functions) |
22656
e3dc0aa099e5
(message-cite-original): If mail-citation-hook
Richard M. Stallman <rms@gnu.org>
parents:
22378
diff
changeset
|
3790 (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
|
3791 (unless (bolp) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3792 (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
|
3793 (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
|
3794 (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
|
3795 (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
|
3796 (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
|
3797 (undo-boundary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3798 (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
|
3799 (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
|
3800 (push-mark) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3801 (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
|
3802 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3803 (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
|
3804 "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
|
3805 (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
|
3806 |
87026
9a6b88cec251
(gnus-extract-address-components): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
86393
diff
changeset
|
3807 (defvar gnus-extract-address-components) |
9a6b88cec251
(gnus-extract-address-components): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
86393
diff
changeset
|
3808 |
87245
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
3809 (autoload 'format-spec "format-spec") |
6207f5a83057
(Info-goto-node, format-spec): Autoload.
Glenn Morris <rgm@gnu.org>
parents:
87191
diff
changeset
|
3810 |
85974 | 3811 (defun message-insert-formatted-citation-line (&optional from date) |
3812 "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
|
3813 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3814 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
|
3815 ;; 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
|
3816 ;; Example: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3817 ;; (with-temp-buffer |
85974 | 3818 ;; (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
|
3819 ;; "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
|
3820 ;; (current-time)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3821 ;; (buffer-string)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3822 (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
|
3823 (unless from |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3824 (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
|
3825 (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
|
3826 (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
|
3827 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
|
3828 '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
|
3829 from) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3830 (error nil))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3831 (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
|
3832 (fname name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3833 (lname name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3834 (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
|
3835 (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
|
3836 (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
|
3837 (replydate |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3838 (or |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3839 date |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3840 ;; 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
|
3841 ;; 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
|
3842 (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
|
3843 (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
|
3844 (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
|
3845 (flist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3846 (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
|
3847 (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
|
3848 ;; 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
|
3849 (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
|
3850 "\\`\\(\\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
|
3851 (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
|
3852 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
|
3853 ((string-match |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3854 "\\`\\(\\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
|
3855 (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
|
3856 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
|
3857 ((string-match |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3858 "\\`\\(\\w\\|[-.]\\)+\\'" name) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3859 (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
|
3860 lname "")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3861 ;; 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
|
3862 (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
|
3863 (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
|
3864 ;; 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
|
3865 (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
|
3866 (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
|
3867 (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
|
3868 (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
|
3869 (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
|
3870 (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
|
3871 (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
|
3872 (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
|
3873 (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
|
3874 (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
|
3875 (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
|
3876 (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
|
3877 (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
|
3878 (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
|
3879 ;; 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
|
3880 (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
|
3881 (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
|
3882 ;; 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
|
3883 (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
|
3884 (>= i ?a))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3885 (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
|
3886 (push (condition-case nil |
105078
40ab4c53d7a6
Fix typos in condition-case handlers.
Glenn Morris <rgm@gnu.org>
parents:
104789
diff
changeset
|
3887 (format-time-string (format "%%%c" i) replydate) |
40ab4c53d7a6
Fix typos in condition-case handlers.
Glenn Morris <rgm@gnu.org>
parents:
104789
diff
changeset
|
3888 (error (format ">%c<" i))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3889 lst)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3890 (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
|
3891 (reverse lst))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3892 (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
|
3893 (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
|
3894 (newline))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3895 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
3896 (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
|
3897 "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
|
3898 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
|
3899 (message-cite-original-1 t)) |
17493 | 3900 |
3901 (defun message-insert-citation-line () | |
35147 | 3902 "Insert a simple citation line." |
17493 | 3903 (when message-reply-headers |
67032
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3904 (insert (mail-header-from message-reply-headers) " writes:") |
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3905 (newline) |
ebf472d3ae22
(message-insert-citation-line): Use newlines.
Chong Yidong <cyd@stupidchicken.com>
parents:
67030
diff
changeset
|
3906 (newline))) |
17493 | 3907 |
3908 (defun message-position-on-field (header &rest afters) | |
3909 (let ((case-fold-search t)) | |
3910 (save-restriction | |
3911 (narrow-to-region | |
3912 (goto-char (point-min)) | |
3913 (progn | |
3914 (re-search-forward | |
3915 (concat "^" (regexp-quote mail-header-separator) "$")) | |
3916 (match-beginning 0))) | |
3917 (goto-char (point-min)) | |
3918 (if (re-search-forward (concat "^" (regexp-quote header) ":") nil t) | |
3919 (progn | |
3920 (re-search-forward "^[^ \t]" nil 'move) | |
3921 (beginning-of-line) | |
3922 (skip-chars-backward "\n") | |
3923 t) | |
3924 (while (and afters | |
3925 (not (re-search-forward | |
3926 (concat "^" (regexp-quote (car afters)) ":") | |
3927 nil t))) | |
3928 (pop afters)) | |
3929 (when afters | |
3930 (re-search-forward "^[^ \t]" nil 'move) | |
3931 (beginning-of-line)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
3932 (insert header ": \n") |
17493 | 3933 (forward-char -1) |
3934 nil)))) | |
3935 | |
3936 (defun message-remove-signature () | |
3937 "Remove the signature from the text between point and mark. | |
3938 The text will also be indented the normal way." | |
3939 (save-excursion | |
3940 (let ((start (point)) | |
3941 mark) | |
3942 (if (not (re-search-forward message-signature-separator (mark t) t)) | |
3943 ;; No signature here, so we just indent the cited text. | |
3944 (message-indent-citation) | |
3945 ;; Find the last non-empty line. | |
3946 (forward-line -1) | |
3947 (while (looking-at "[ \t]*$") | |
3948 (forward-line -1)) | |
3949 (forward-line 1) | |
3950 (setq mark (set-marker (make-marker) (point))) | |
3951 (goto-char start) | |
3952 (message-indent-citation) | |
3953 ;; Enable undoing the deletion. | |
3954 (undo-boundary) | |
3955 (delete-region mark (mark t)) | |
3956 (set-marker mark nil))))) | |
3957 | |
3958 | |
3959 | |
3960 ;;; | |
3961 ;;; Sending messages | |
3962 ;;; | |
3963 | |
3964 (defun message-send-and-exit (&optional arg) | |
3965 "Send message like `message-send', then, if no errors, exit from mail buffer." | |
3966 (interactive "P") | |
3967 (let ((buf (current-buffer)) | |
3968 (actions message-exit-actions)) | |
3969 (when (and (message-send arg) | |
3970 (buffer-name buf)) | |
3971 (if message-kill-buffer-on-exit | |
3972 (kill-buffer buf) | |
3973 (bury-buffer buf) | |
3974 (when (eq buf (current-buffer)) | |
3975 (message-bury buf))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3976 (message-do-actions actions) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3977 t))) |
17493 | 3978 |
3979 (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
|
3980 "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
|
3981 Instead, just auto-save the buffer and then bury it." |
17493 | 3982 (interactive) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3983 (set-buffer-modified-p t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
3984 (save-buffer) |
17493 | 3985 (let ((actions message-postpone-actions)) |
3986 (message-bury (current-buffer)) | |
3987 (message-do-actions actions))) | |
3988 | |
3989 (defun message-kill-buffer () | |
3990 "Kill the current buffer." | |
3991 (interactive) | |
3992 (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
|
3993 (not message-kill-buffer-query) |
17493 | 3994 (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
|
3995 (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
|
3996 (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
|
3997 (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
|
3998 (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
|
3999 (modified (buffer-modified-p))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4000 (setq buffer-file-name nil) |
17493 | 4001 (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
|
4002 (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
|
4003 (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
|
4004 (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
|
4005 (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
|
4006 (progn |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
4007 ;; 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
|
4008 ;; `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
|
4009 ;; `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
|
4010 ;; 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
|
4011 ;; current frame: |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
4012 (raise-frame) |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64712
diff
changeset
|
4013 (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
|
4014 (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
|
4015 (ignore-errors |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4016 (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
|
4017 (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
|
4018 (message-disassociate-draft))) |
17493 | 4019 (message-do-actions actions)))) |
4020 | |
4021 (defun message-bury (buffer) | |
35147 | 4022 "Bury this mail BUFFER." |
17493 | 4023 (let ((newbuf (other-buffer buffer))) |
4024 (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
|
4025 (if (and (window-dedicated-p (selected-window)) |
17493 | 4026 (not (null (delq (selected-frame) (visible-frame-list))))) |
4027 (delete-frame (selected-frame)) | |
4028 (switch-to-buffer newbuf)))) | |
4029 | |
4030 (defun message-send (&optional arg) | |
4031 "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
|
4032 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
|
4033 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
|
4034 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
|
4035 the mailer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4036 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
|
4037 It should typically alter the sending method in some way or other." |
17493 | 4038 (interactive "P") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4039 ;; 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
|
4040 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4041 (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
|
4042 (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
|
4043 (message-fix-before-sending) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4044 (run-hooks 'message-send-hook) |
97972 | 4045 (when message-confirm-send |
4046 (or (y-or-n-p "Send message? ") | |
4047 (keyboard-quit))) | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4048 (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
|
4049 (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
|
4050 (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
|
4051 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
|
4052 (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
|
4053 (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
|
4054 (while (and success |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4055 (setq elem (pop alist))) |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4056 (when (funcall (cadr elem)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4057 (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
|
4058 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
|
4059 (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
|
4060 (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
|
4061 (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
|
4062 (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
|
4063 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4064 "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
|
4065 (car elem))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4066 (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
|
4067 (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
|
4068 (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
|
4069 (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
|
4070 (not success) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4071 (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
|
4072 (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
|
4073 (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
|
4074 (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
|
4075 (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
|
4076 (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
|
4077 (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
|
4078 (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
|
4079 (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
|
4080 (fcc "Fcc") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4081 (t "Gcc")))))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4082 (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
|
4083 (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
|
4084 (and success sent)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4085 (message-do-fcc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4086 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4087 (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
|
4088 (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
|
4089 ;; 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
|
4090 (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
|
4091 (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
|
4092 ;; 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
|
4093 (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
|
4094 (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
|
4095 (message-disassociate-draft) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4096 ;; 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
|
4097 (message-do-send-housekeeping) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4098 (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
|
4099 ;; Return success. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4100 t))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4101 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4102 (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
|
4103 "Send the current message via mail." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4104 (message-send-mail arg)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4105 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4106 (defun message-send-via-news (arg) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4107 "Send the current message via news." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4108 (funcall message-send-news-function arg)) |
17493 | 4109 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4110 (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
|
4111 "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
|
4112 `(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
|
4113 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4114 ,@forms))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4115 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4116 (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
|
4117 (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
|
4118 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4119 (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
|
4120 "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
|
4121 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
|
4122 `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
|
4123 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
|
4124 (unless start |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4125 (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
|
4126 (unless end |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4127 (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
|
4128 (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
|
4129 (if reverse |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4130 (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
|
4131 (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
|
4132 (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
|
4133 (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
|
4134 (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
|
4135 (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
|
4136 (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
|
4137 (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
|
4138 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
|
4139 (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
|
4140 (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
|
4141 (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
|
4142 (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
|
4143 (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
|
4144 |
95451 | 4145 (defcustom message-bogus-addresses |
4146 ;; '("noreply" "nospam" "invalid") | |
4147 '("noreply" "nospam" "invalid" "@@" "[^[:ascii:]].*@" "[ \t]") | |
4148 "List of regexps of potentially bogus mail addresses. | |
4149 See `message-check-recipients' how to setup checking. | |
4150 | |
4151 This list should make it possible to catch typos or warn about | |
4152 spam-trap addresses. It doesn't aim to verify strict RFC | |
4153 conformance." | |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
4154 :version "23.1" ;; No Gnus |
85809 | 4155 :group 'message-headers |
95451 | 4156 :type '(choice |
4157 (const :tag "None" nil) | |
4158 (list | |
4159 (set :inline t | |
4160 (const "noreply") | |
4161 (const "nospam") | |
4162 (const "invalid") | |
4163 (const :tag "duplicate @" "@@") | |
4164 (const :tag "non-ascii local part" "[^[:ascii:]].*@") | |
4165 ;; Already caught by `message-valid-fqdn-regexp' | |
4166 ;; (const :tag "`_' in domain part" "@.*_") | |
4167 (const :tag "whitespace" "[ \t]")) | |
4168 (repeat :inline t | |
4169 :tag "Other" | |
4170 (regexp))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4171 |
17493 | 4172 (defun message-fix-before-sending () |
4173 "Do various things to make the message nice before sending it." | |
4174 ;; Make sure there's a newline at the end of the message. | |
4175 (goto-char (point-max)) | |
4176 (unless (bolp) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4177 (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
|
4178 ;; 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
|
4179 (widen) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4180 ;; 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
|
4181 (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
|
4182 ;; 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
|
4183 ;; 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
|
4184 ;; 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
|
4185 (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
|
4186 (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
|
4187 from to) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4188 (when regions |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4189 (while regions |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4190 (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
|
4191 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
|
4192 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
|
4193 (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
|
4194 (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
|
4195 'face 'highlight)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4196 (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
|
4197 "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
|
4198 (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
|
4199 (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
|
4200 (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
|
4201 (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
|
4202 (while (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4203 (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
|
4204 (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
|
4205 ;; 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
|
4206 ;; 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
|
4207 (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
|
4208 (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
|
4209 (point-max)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4210 (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
|
4211 (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
|
4212 (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
|
4213 (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
|
4214 '(eight-bit-control eight-bit-graphic |
100993 | 4215 ;; Emacs 23, Bug#1770: |
4216 eight-bit | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4217 control-1)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4218 (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
|
4219 (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
|
4220 (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
|
4221 'face 'highlight) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4222 (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
|
4223 (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
|
4224 (when found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4225 (setq choice |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4226 (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
|
4227 "Non-printable characters found. Continue sending?" |
74021 | 4228 `((?d "Remove non-printable characters and send") |
4229 (?r ,(format | |
4230 "Replace non-printable characters with \"%s\" and send" | |
4231 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
|
4232 (?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
|
4233 (?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
|
4234 (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
|
4235 (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
|
4236 (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
|
4237 (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
|
4238 (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
|
4239 (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
|
4240 (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
|
4241 (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
|
4242 ;; FIXME: Wrong for Emacs 23 (unicode) and for |
100993 | 4243 ;; things like undecodable utf-8 (in Emacs 21?). |
4244 ;; Should at least use find-coding-systems-region. | |
4245 ;; -- fx | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4246 (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
|
4247 '(eight-bit-control eight-bit-graphic |
100993 | 4248 ;; Emacs 23, Bug#1770: |
4249 eight-bit | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4250 control-1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4251 (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
|
4252 (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
|
4253 (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
|
4254 (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
|
4255 (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
|
4256 (when (eq choice ?r) |
74021 | 4257 (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
|
4258 (forward-char) |
85809 | 4259 (skip-chars-forward mm-7bit-chars))))) |
4260 (message-check 'bogus-recipient | |
95086 | 4261 ;; Warn before sending a mail to an invalid address. |
85809 | 4262 (message-check-recipients))) |
4263 | |
4264 (defun message-bogus-recipient-p (recipients) | |
4265 "Check if a mail address in RECIPIENTS looks bogus. | |
4266 | |
4267 RECIPIENTS is a mail header. Return a list of potentially bogus | |
4268 addresses. If none is found, return nil. | |
4269 | |
95451 | 4270 An address might be bogus if the domain part is not fully |
4271 qualified, see `message-valid-fqdn-regexp', or if there's a | |
4272 matching entry in `message-bogus-addresses'." | |
85809 | 4273 ;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"? |
4274 (let (found) | |
4275 (mapc (lambda (address) | |
4276 (setq address (cadr address)) | |
4277 (when | |
4278 (or (not | |
4279 (or | |
4280 (not (string-match "@" address)) | |
4281 (string-match | |
4282 (concat ".@.*\\(" | |
4283 message-valid-fqdn-regexp "\\)\\'") address))) | |
95451 | 4284 (and message-bogus-addresses |
4285 (let ((re | |
4286 (if (listp message-bogus-addresses) | |
4287 (mapconcat 'identity | |
4288 message-bogus-addresses | |
4289 "\\|") | |
4290 message-bogus-addresses))) | |
4291 (string-match re address)))) | |
4292 (push address found))) | |
85809 | 4293 ;; |
4294 (mail-extract-address-components recipients t)) | |
4295 found)) | |
4296 | |
4297 (defun message-check-recipients () | |
4298 "Warn before composing or sending a mail to an invalid address. | |
4299 | |
4300 This function could be useful in `message-setup-hook'." | |
4301 (interactive) | |
4302 (save-restriction | |
4303 (message-narrow-to-headers) | |
4304 (dolist (hdr '("To" "Cc" "Bcc")) | |
4305 (let ((addr (message-fetch-field hdr))) | |
4306 (when (stringp addr) | |
4307 (dolist (bog (message-bogus-recipient-p addr)) | |
4308 (and bog | |
4309 (not (y-or-n-p | |
4310 (format | |
4311 "Address `%s' might be bogus. Continue? " bog))) | |
105167
e14dfafc8256
* gnus-art.el (gnus-article-encrypt-body):
Juanma Barranquero <lekktu@gmail.com>
parents:
105078
diff
changeset
|
4312 (error "Bogus address")))))))) |
17493 | 4313 |
95086 | 4314 (custom-add-option 'message-setup-hook 'message-check-recipients) |
4315 | |
17493 | 4316 (defun message-add-action (action &rest types) |
4317 "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
|
4318 (while types |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4319 (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
|
4320 action))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4321 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4322 (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
|
4323 "Delete ACTION from lists of actions performed when doing an exit of type TYPES." |
17493 | 4324 (let (var) |
4325 (while types | |
4326 (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
|
4327 (delq action (symbol-value var)))))) |
17493 | 4328 |
4329 (defun message-do-actions (actions) | |
4330 "Perform all actions in ACTIONS." | |
4331 ;; 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
|
4332 (dolist (action actions) |
17493 | 4333 (ignore-errors |
4334 (cond | |
4335 ;; 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
|
4336 ((functionp action) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4337 (funcall action)) |
17493 | 4338 ;; Something to be evaled. |
4339 (t | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
4340 (eval action)))))) |
17493 | 4341 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4342 (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
|
4343 "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
|
4344 ;; 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
|
4345 (goto-char (point-min)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4346 (re-search-forward |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4347 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4348 (replace-match "\n") |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
4349 (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
|
4350 (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
|
4351 (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
|
4352 (curbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4353 (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
|
4354 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
|
4355 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4356 (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
|
4357 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4358 (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
|
4359 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4360 (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
|
4361 (push p plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4362 (setq p (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4363 (setq total (length plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4364 (push (point-max) plist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4365 (setq plist (nreverse plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4366 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4367 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4368 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4369 (while plist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4370 (set-buffer curbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4371 (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
|
4372 (set-buffer tembuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4373 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4374 (if header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4375 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4376 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4377 (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
|
4378 (insert header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4379 (message-goto-eoh) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4380 (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
|
4381 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4382 (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
|
4383 (insert header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4384 (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
|
4385 (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
|
4386 (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
|
4387 (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
|
4388 (message-remove-header "Lines") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4389 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4390 (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
|
4391 (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
|
4392 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4393 (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
|
4394 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
|
4395 (forward-char -1) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4396 (let ((mail-header-separator "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4397 (when (memq 'Message-ID message-required-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4398 (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
|
4399 (when (memq 'Lines message-required-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4400 (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
|
4401 (message-goto-subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4402 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4403 (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
|
4404 (widen) |
99777
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4405 (funcall (or message-send-mail-real-function |
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4406 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
|
4407 (setq n (+ n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4408 (setq p (pop plist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4409 (erase-buffer))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4410 (kill-buffer tembuf)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4411 |
17493 | 4412 (defun message-send-mail (&optional arg) |
4413 (require 'mail-utils) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4414 (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
|
4415 (case-fold-search nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4416 (news (message-news-p)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4417 (mailbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4418 (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
|
4419 (message-posting-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4420 (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
|
4421 (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
|
4422 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
|
4423 (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
|
4424 (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
|
4425 (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
|
4426 (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
|
4427 ;; 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
|
4428 (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
|
4429 ;; ...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
|
4430 ;; 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
|
4431 (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
|
4432 (message "Generating hashcash...done")) |
17493 | 4433 (save-restriction |
4434 (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
|
4435 ;; 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
|
4436 (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
|
4437 (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
|
4438 (setq headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4439 (cons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4440 (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
|
4441 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
|
4442 ;; 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
|
4443 (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
|
4444 (message-remove-header "^Mail-Followup-To:"))) |
17493 | 4445 ;; Insert some headers. |
4446 (let ((message-deletable-headers | |
4447 (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
|
4448 (message-generate-headers headers)) |
71379 | 4449 ;; Check continuation headers. |
4450 (message-check 'continuation-headers | |
4451 (goto-char (point-min)) | |
4452 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t) | |
4453 (goto-char (match-beginning 0)) | |
4454 (if (y-or-n-p "Fix continuation lines? ") | |
4455 (insert " ") | |
4456 (forward-line 1) | |
4457 (unless (y-or-n-p "Send anyway? ") | |
4458 (error "Failed to send the message"))))) | |
17493 | 4459 ;; Let the user do all of the above. |
4460 (run-hooks 'message-header-hook)) | |
4461 (unwind-protect | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4462 (with-current-buffer tembuf |
17493 | 4463 (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
|
4464 ;; 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
|
4465 (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
|
4466 (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
|
4467 (point-min) (point-max)))) |
17493 | 4468 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4469 (message-encode-message-body) |
17493 | 4470 (save-restriction |
4471 (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
|
4472 ;; 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
|
4473 (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
|
4474 (message-generate-headers '(Lines))) |
17493 | 4475 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4476 (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
|
4477 (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
|
4478 (mail-encode-encoded-word-buffer))) |
17493 | 4479 (goto-char (point-max)) |
4480 ;; require one newline at the end. | |
4481 (or (= (preceding-char) ?\n) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4482 (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
|
4483 (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
|
4484 ;; 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
|
4485 ;; 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
|
4486 ;; non-ASCII characters. -- jh |
35147 | 4487 (when |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4488 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4489 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4490 (and news |
17493 | 4491 (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
|
4492 (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
|
4493 (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
|
4494 (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
|
4495 "content-type"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4496 (and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4497 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4498 (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
|
4499 (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
|
4500 (car |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4501 (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
|
4502 content-type)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4503 (not |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4504 (string= "base64" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4505 (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
|
4506 "content-transfer-encoding"))))))) |
17493 | 4507 (message-insert-courtesy-copy)) |
99777
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4508 ;; Let's make sure we encoded all the body. |
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4509 (assert (save-excursion |
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4510 (goto-char (point-min)) |
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4511 (not (re-search-forward "[^\000-\377]" nil t)))) |
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4512 (mm-disable-multibyte) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4513 (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
|
4514 (< (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
|
4515 (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
|
4516 "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
|
4517 t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4518 "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4519 The message size, " |
56947
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4520 (/ (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
|
4521 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4522 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
|
4523 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
|
4524 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
|
4525 (/ 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
|
4526 "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
|
4527 one. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4528 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4529 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
|
4530 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
|
4531 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
|
4532 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4533 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
|
4534 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
|
4535 `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
|
4536 "))) |
99777
b1be79c8e945
(message-send-mail): Just set the buffer to unibyte
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
98398
diff
changeset
|
4537 (progn |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4538 (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
|
4539 (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
|
4540 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
|
4541 (message-send-mail-partially))) |
17493 | 4542 (kill-buffer tembuf)) |
4543 (set-buffer mailbuf) | |
4544 (push 'mail message-sent-message-via))) | |
4545 | |
4546 (defun message-send-mail-with-sendmail () | |
4547 "Send off the prepared buffer with sendmail." | |
4548 (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
|
4549 (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
|
4550 " sendmail errors") |
17493 | 4551 0)) |
4552 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
|
4553 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4554 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4555 (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
|
4556 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4557 (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
|
4558 (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
|
4559 ;; 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
|
4560 (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
|
4561 (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
|
4562 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4563 (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
|
4564 (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
|
4565 (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
|
4566 (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
|
4567 ;; 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
|
4568 ;; 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
|
4569 (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
|
4570 (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
|
4571 (newline)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4572 (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
|
4573 (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
|
4574 (erase-buffer)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4575 (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
|
4576 (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
|
4577 (cpr (apply |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4578 '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
|
4579 (append |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4580 (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
|
4581 (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
|
4582 sendmail-program) |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4583 ((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
|
4584 "/usr/sbin/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4585 ((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
|
4586 "/usr/lib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4587 ((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
|
4588 "/usr/ucblib/sendmail") |
cbdca6c6638d
* message.el (message-send-mail-with-sendmail): Look for sendmail in
Chong Yidong <cyd@stupidchicken.com>
parents:
71398
diff
changeset
|
4589 (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
|
4590 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
|
4591 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
|
4592 ;; 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
|
4593 ;; 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
|
4594 ;; 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
|
4595 ;; we'll let users override this. |
106118
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
4596 (and (null message-sendmail-f-is-evil) |
8542a4738a96
* message.el (message-from-style, message-interactive)
Chong Yidong <cyd@stupidchicken.com>
parents:
105167
diff
changeset
|
4597 (list "-f" (message-sendmail-envelope-from))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4598 ;; 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
|
4599 ;; 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
|
4600 (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
|
4601 ;; 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
|
4602 ;; 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
|
4603 ;; 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
|
4604 ;; 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
|
4605 ;; 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
|
4606 (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
|
4607 (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
|
4608 '("-t")))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4609 (unless (or (null cpr) (and (numberp cpr) (zerop cpr))) |
96596
fe7840feb64b
(message-send-mail-with-sendmail): Display the error message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96376
diff
changeset
|
4610 (if errbuf (pop-to-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
|
4611 (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
|
4612 (when message-interactive |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4613 (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
|
4614 (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
|
4615 (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
|
4616 (replace-match "; ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4617 (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
|
4618 (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
|
4619 (buffer-string)))))) |
17493 | 4620 (when (bufferp errbuf) |
4621 (kill-buffer errbuf))))) | |
4622 | |
4623 (defun message-send-mail-with-qmail () | |
4624 "Pass the prepared message buffer to qmail-inject. | |
4625 Refer to the documentation for the variable `message-send-mail-function' | |
4626 to find out how to use this." | |
4627 ;; replace the header delimiter with a blank line | |
4628 (goto-char (point-min)) | |
4629 (re-search-forward | |
4630 (concat "^" (regexp-quote mail-header-separator) "\n")) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4631 (replace-match "\n") |
17493 | 4632 (run-hooks 'message-send-mail-hook) |
4633 ;; send the message | |
4634 (case | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4635 (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
|
4636 (apply |
56947
a1a3a7ab3bad
(message-tokenize-header, message-send-mail-with-qmail):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56927
diff
changeset
|
4637 '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
|
4638 message-qmail-inject-program nil nil nil |
96376
c3309dba6542
American English spelling fix.
Glenn Morris <rgm@gnu.org>
parents:
95820
diff
changeset
|
4639 ;; qmail-inject's default behavior is to look for addresses on the |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4640 ;; 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
|
4641 ;; 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
|
4642 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4643 ;; 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
|
4644 ;; 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
|
4645 ;; message from stdin. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4646 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4647 ;; 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
|
4648 ;; 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
|
4649 ;; 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
|
4650 ;; for sendmail's lost innocence. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4651 ;; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4652 ;; 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
|
4653 ;; 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
|
4654 ;; 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
|
4655 ;; 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
|
4656 (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
|
4657 (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
|
4658 message-qmail-inject-args))) |
17493 | 4659 ;; qmail-inject doesn't say anything on it's stdout/stderr, |
4660 ;; we have to look at the retval instead | |
4661 (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
|
4662 (100 (error "qmail-inject reported permanent failure")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4663 (111 (error "qmail-inject reported transient failure")) |
17493 | 4664 ;; should never happen |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
4665 (t (error "qmail-inject reported unknown failure")))) |
17493 | 4666 |
4667 (defun message-send-mail-with-mh () | |
4668 "Send the prepared message buffer with mh." | |
4669 (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
|
4670 (name (mh-new-draft-name))) |
17493 | 4671 (setq buffer-file-name name) |
4672 ;; MH wants to generate these headers itself. | |
4673 (when message-mh-deletable-headers | |
4674 (let ((headers message-mh-deletable-headers)) | |
4675 (while headers | |
4676 (goto-char (point-min)) | |
4677 (and (re-search-forward | |
4678 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
4679 (message-delete-line)) | |
4680 (pop headers)))) | |
4681 (run-hooks 'message-send-mail-hook) | |
4682 ;; Pass it on to mh. | |
4683 (mh-send-letter))) | |
4684 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4685 (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
|
4686 "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
|
4687 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
|
4688 `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
|
4689 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
|
4690 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
|
4691 (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
|
4692 (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
|
4693 |
86254
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4694 (defun message-send-mail-with-mailclient () |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4695 "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
|
4696 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
|
4697 `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
|
4698 (run-hooks 'message-send-mail-hook) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4699 (mailclient-send-it)) |
0d061e2dce73
(message-send-mail-function): New function.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
86154
diff
changeset
|
4700 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4701 (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
|
4702 "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
|
4703 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
|
4704 (require 'sha1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4705 (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
|
4706 (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
|
4707 (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
|
4708 (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
|
4709 (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
|
4710 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4711 (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
|
4712 "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
|
4713 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
|
4714 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
|
4715 (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
|
4716 (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
|
4717 (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
|
4718 canlock-password) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4719 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4720 (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
|
4721 (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
|
4722 (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
|
4723 (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
|
4724 |
17493 | 4725 (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
|
4726 (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
|
4727 (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
|
4728 (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
|
4729 (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
|
4730 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
|
4731 (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
|
4732 (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
|
4733 (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
|
4734 (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
|
4735 (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
|
4736 (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
|
4737 ;; 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
|
4738 ;; 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
|
4739 ;; 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
|
4740 ;; -- 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
|
4741 (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
|
4742 (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
|
4743 (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
|
4744 (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
|
4745 (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
|
4746 (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
|
4747 (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
|
4748 (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
|
4749 (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
|
4750 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
|
4751 (messbuf (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4752 (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
|
4753 (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
|
4754 (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
|
4755 (cons '(existing-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4756 message-syntax-checks) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4757 message-syntax-checks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4758 (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
|
4759 (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
|
4760 (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
|
4761 result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4762 (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
|
4763 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4764 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4765 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4766 ;; Insert some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4767 (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
|
4768 (message-insert-canlock) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4769 ;; 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
|
4770 (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
|
4771 ;; 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
|
4772 ;; 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
|
4773 (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
|
4774 (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
|
4775 (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
|
4776 (cons '(valid-newsgroups . disabled) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4777 message-syntax-checks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4778 (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
|
4779 (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
|
4780 (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
|
4781 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4782 (unwind-protect |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
4783 (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
|
4784 (buffer-disable-undo) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4785 (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
|
4786 ;; 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
|
4787 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4788 (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
|
4789 (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
|
4790 (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
|
4791 (message-encode-message-body) |
17493 | 4792 ;; Remove some headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4793 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4794 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4795 ;; 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
|
4796 (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
|
4797 (message-generate-headers '(Lines))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4798 ;; Remove some headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4799 (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
|
4800 (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
|
4801 (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
|
4802 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4803 ;; 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
|
4804 (or (= (preceding-char) ?\n) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4805 (insert ?\n)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4806 (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
|
4807 ;; Remove the delimiter. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4808 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4809 (re-search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4810 (concat "^" (regexp-quote mail-header-separator) "\n")) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4811 (replace-match "\n") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4812 (backward-char 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4813 (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
|
4814 (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
|
4815 (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
|
4816 (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
|
4817 (gnus-request-post method)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4818 (kill-buffer tembuf)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4819 (set-buffer messbuf) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4820 (if result |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4821 (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
|
4822 (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
|
4823 (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
|
4824 nil))))) |
17493 | 4825 |
4826 ;;; | |
4827 ;;; Header generation & syntax checking. | |
4828 ;;; | |
4829 | |
4830 (defun message-check-element (type) | |
35147 | 4831 "Return non-nil if this TYPE is not to be checked." |
17493 | 4832 (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) |
4833 t | |
4834 (let ((able (assq type message-syntax-checks))) | |
4835 (and (consp able) | |
4836 (eq (cdr able) 'disabled))))) | |
4837 | |
4838 (defun message-check-news-syntax () | |
4839 "Check the syntax of the message." | |
4840 (save-excursion | |
4841 (save-restriction | |
4842 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4843 ;; 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
|
4844 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4845 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4846 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4847 (message-check-news-header-syntax)))))) |
17493 | 4848 |
4849 (defun message-check-news-header-syntax () | |
4850 (and | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4851 ;; Check Newsgroups header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4852 (message-check 'newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4853 (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
|
4854 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4855 (and group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4856 (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
|
4857 (ignore |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4858 (message |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4859 "The newsgroups field is empty or missing. Posting is denied."))))) |
17493 | 4860 ;; Check the Subject header. |
4861 (message-check 'subject | |
4862 (let* ((case-fold-search t) | |
4863 (subject (message-fetch-field "subject"))) | |
4864 (or | |
4865 (and subject | |
4866 (not (string-match "\\`[ \t]*\\'" subject))) | |
4867 (ignore | |
4868 (message | |
4869 "The subject field is empty or missing. Posting is denied."))))) | |
4870 ;; Check for commands in Subject. | |
4871 (message-check 'subject-cmsg | |
4872 (if (string-match "^cmsg " (message-fetch-field "subject")) | |
4873 (y-or-n-p | |
4874 "The control code \"cmsg\" is in the subject. Really post? ") | |
4875 t)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4876 ;; 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
|
4877 (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
|
4878 (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
|
4879 (header nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4880 (length 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4881 found) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4882 (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
|
4883 (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
|
4884 (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
|
4885 (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
|
4886 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
|
4887 (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
|
4888 (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
|
4889 (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
|
4890 (if found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4891 (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
|
4892 header length)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4893 t))) |
17493 | 4894 ;; Check for multiple identical headers. |
4895 (message-check 'multiple-headers | |
4896 (let (found) | |
4897 (while (and (not found) | |
4898 (re-search-forward "^[^ \t:]+: " nil t)) | |
4899 (save-excursion | |
4900 (or (re-search-forward | |
4901 (concat "^" | |
4902 (regexp-quote | |
4903 (setq found | |
4904 (buffer-substring | |
4905 (match-beginning 0) (- (match-end 0) 2)))) | |
4906 ":") | |
4907 nil t) | |
4908 (setq found nil)))) | |
4909 (if found | |
4910 (y-or-n-p (format "Multiple %s headers. Really post? " found)) | |
4911 t))) | |
4912 ;; Check for Version and Sendsys. | |
4913 (message-check 'sendsys | |
4914 (if (re-search-forward "^Sendsys:\\|^Version:" nil t) | |
4915 (y-or-n-p | |
4916 (format "The article contains a %s command. Really post? " | |
4917 (buffer-substring (match-beginning 0) | |
4918 (1- (match-end 0))))) | |
4919 t)) | |
4920 ;; See whether we can shorten Followup-To. | |
4921 (message-check 'shorten-followup-to | |
4922 (let ((newsgroups (message-fetch-field "newsgroups")) | |
4923 (followup-to (message-fetch-field "followup-to")) | |
4924 to) | |
4925 (when (and newsgroups | |
4926 (string-match "," newsgroups) | |
4927 (not followup-to) | |
4928 (not | |
4929 (zerop | |
4930 (length | |
4931 (setq to (completing-read | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65342
diff
changeset
|
4932 "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
|
4933 (mapcar #'list |
17493 | 4934 (cons "poster" |
4935 (message-tokenize-header | |
4936 newsgroups))))))))) | |
4937 (goto-char (point-min)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
4938 (insert "Followup-To: " to "\n")) |
17493 | 4939 t)) |
4940 ;; Check "Shoot me". | |
4941 (message-check 'shoot | |
4942 (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
|
4943 "Message-ID.*.i-did-not-set--mail-host-address--so-tickle-me" nil t) |
17493 | 4944 (y-or-n-p "You appear to have a misconfigured system. Really post? ") |
4945 t)) | |
4946 ;; Check for Approved. | |
4947 (message-check 'approved | |
4948 (if (re-search-forward "^Approved:" nil t) | |
4949 (y-or-n-p "The article contains an Approved header. Really post? ") | |
4950 t)) | |
4951 ;; Check the Message-ID header. | |
4952 (message-check 'message-id | |
4953 (let* ((case-fold-search t) | |
4954 (message-id (message-fetch-field "message-id" t))) | |
4955 (or (not message-id) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4956 ;; Is there an @ in the ID? |
17493 | 4957 (and (string-match "@" message-id) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4958 ;; 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
|
4959 (string-match "@[^.]*\\." message-id) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
4960 ;; 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
|
4961 (not (string-match "\\.>" message-id))) |
17493 | 4962 (y-or-n-p |
4963 (format "The Message-ID looks strange: \"%s\". Really post? " | |
4964 message-id))))) | |
4965 ;; Check the Newsgroups & Followup-To headers. | |
4966 (message-check 'existing-newsgroups | |
4967 (let* ((case-fold-search t) | |
4968 (newsgroups (message-fetch-field "newsgroups")) | |
4969 (followup-to (message-fetch-field "followup-to")) | |
4970 (groups (message-tokenize-header | |
4971 (if followup-to | |
4972 (concat newsgroups "," followup-to) | |
4973 newsgroups))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4974 (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
|
4975 (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
|
4976 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
|
4977 ;; 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
|
4978 ;; 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
|
4979 ;; -- 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
|
4980 (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
|
4981 (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
|
4982 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
|
4983 (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
|
4984 (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
|
4985 (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
|
4986 (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
|
4987 post-method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4988 (known-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4989 (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
|
4990 (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
|
4991 (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
|
4992 (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
|
4993 (gnus-groups-from-server method))) |
17493 | 4994 errors) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4995 (while groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
4996 (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
|
4997 (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
|
4998 (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
|
4999 (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
|
5000 (pop groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5001 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5002 ;; 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
|
5003 ((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
|
5004 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
|
5005 (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
|
5006 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5007 ;; 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
|
5008 ((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
|
5009 (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
|
5010 errors) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5011 (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
|
5012 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5013 "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
|
5014 (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
|
5015 (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
|
5016 (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
|
5017 ;; 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
|
5018 ((not errors) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5019 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5020 ;; 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
|
5021 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5022 (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
|
5023 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5024 "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
|
5025 (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
|
5026 (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
|
5027 (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
|
5028 ;; 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
|
5029 (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
|
5030 (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
|
5031 (let ((do-posting t)) |
71379 | 5032 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t) |
5033 (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
|
5034 (if (y-or-n-p "Fix continuation lines? ") |
71379 | 5035 (insert " ") |
5036 (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
|
5037 (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
|
5038 (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
|
5039 do-posting)) |
17493 | 5040 ;; Check the Newsgroups & Followup-To headers for syntax errors. |
5041 (message-check 'valid-newsgroups | |
5042 (let ((case-fold-search t) | |
5043 (headers '("Newsgroups" "Followup-To")) | |
5044 header error) | |
5045 (while (and headers (not error)) | |
5046 (when (setq header (mail-fetch-field (car headers))) | |
5047 (if (or | |
5048 (not | |
5049 (string-match | |
5050 "\\`\\([-+_&.a-zA-Z0-9]+\\)?\\(,[-+_&.a-zA-Z0-9]+\\)*\\'" | |
5051 header)) | |
5052 (memq | |
5053 nil (mapcar | |
5054 (lambda (g) | |
5055 (not (string-match "\\.\\'\\|\\.\\." g))) | |
5056 (message-tokenize-header header ",")))) | |
5057 (setq error t))) | |
5058 (unless error | |
5059 (pop headers))) | |
5060 (if (not error) | |
5061 t | |
5062 (y-or-n-p | |
5063 (format "The %s header looks odd: \"%s\". Really post? " | |
5064 (car headers) header))))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5065 (message-check 'repeated-newsgroups |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5066 (let ((case-fold-search t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5067 (headers '("Newsgroups" "Followup-To")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5068 header error groups group) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5069 (while (and headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5070 (not error)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5071 (when (setq header (mail-fetch-field (pop headers))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5072 (setq groups (message-tokenize-header header ",")) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5073 (while (setq group (pop groups)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5074 (when (member group groups) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5075 (setq error group |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5076 groups nil))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5077 (if (not error) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5078 t |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5079 (y-or-n-p |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5080 (format "Group %s is repeated in headers. Really post? " error))))) |
17493 | 5081 ;; Check the From header. |
5082 (message-check 'from | |
5083 (let* ((case-fold-search t) | |
5084 (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
|
5085 ad) |
17493 | 5086 (cond |
5087 ((not from) | |
5088 (message "There is no From line. Posting is denied.") | |
5089 nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5090 ((or (not (string-match |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5091 "@[^\\.]*\\." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5092 (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
|
5093 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
|
5094 (string-match "\\.\\." ad) ;larsi@ifi..uio |
17493 | 5095 (string-match "@\\." ad) ;larsi@.ifi.uio |
5096 (string-match "\\.$" ad) ;larsi@ifi.uio. | |
5097 (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio | |
5098 (string-match "(.*).*(.*)" from)) ;(lars) (lars) | |
5099 (message | |
5100 "Denied posting -- the From looks strange: \"%s\"." from) | |
5101 nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5102 ((let ((addresses (rfc822-addresses from))) |
106746 | 5103 ;; `rfc822-addresses' returns a string if parsing fails. |
5104 (while (and (consp addresses) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5105 (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
|
5106 (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
|
5107 addresses) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5108 (message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5109 "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
|
5110 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5111 (t t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5112 ;; 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
|
5113 (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
|
5114 (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
|
5115 (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
|
5116 ad) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5117 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5118 ((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
|
5119 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5120 ((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
|
5121 (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
|
5122 (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
|
5123 reply-to))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5124 ((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
|
5125 "@[^\\.]*\\." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5126 (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
|
5127 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
|
5128 (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
|
5129 (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
|
5130 (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
|
5131 (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
|
5132 (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
|
5133 (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
|
5134 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5135 "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
|
5136 reply-to))) |
17493 | 5137 (t t)))))) |
5138 | |
5139 (defun message-check-news-body-syntax () | |
5140 (and | |
5141 ;; Check for long lines. | |
5142 (message-check 'long-lines | |
5143 (goto-char (point-min)) | |
5144 (re-search-forward | |
5145 (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
|
5146 (forward-line 1) |
17493 | 5147 (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
|
5148 (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
|
5149 "<#\\(/\\)?\\(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
|
5150 (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
|
5151 (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
|
5152 (< (- (point) p) 80))) |
17493 | 5153 (zerop (forward-line 1)))) |
5154 (or (bolp) | |
5155 (eobp) | |
5156 (y-or-n-p | |
5157 "You have lines longer than 79 characters. Really post? "))) | |
5158 ;; Check whether the article is empty. | |
5159 (message-check 'empty | |
5160 (goto-char (point-min)) | |
5161 (re-search-forward | |
5162 (concat "^" (regexp-quote mail-header-separator) "$")) | |
5163 (forward-line 1) | |
5164 (let ((b (point))) | |
5165 (goto-char (point-max)) | |
5166 (re-search-backward message-signature-separator nil t) | |
5167 (beginning-of-line) | |
5168 (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
|
5169 (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
|
5170 (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
|
5171 (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
|
5172 nil)))) |
17493 | 5173 ;; Check for control characters. |
5174 (message-check 'control-chars | |
57321
3381cb76bac3
* gnus-group.el (gnus-update-group-mark-positions):
Juri Linkov <juri@jurta.org>
parents:
57243
diff
changeset
|
5175 (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
|
5176 (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
|
5177 nil t) |
17493 | 5178 (y-or-n-p |
5179 "The article contains control characters. Really post? ") | |
5180 t)) | |
5181 ;; Check excessive size. | |
5182 (message-check 'size | |
5183 (if (> (buffer-size) 60000) | |
5184 (y-or-n-p | |
5185 (format "The article is %d octets long. Really post? " | |
5186 (buffer-size))) | |
5187 t)) | |
5188 ;; Check whether any new text has been added. | |
5189 (message-check 'new-text | |
5190 (or | |
5191 (not message-checksum) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5192 (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
|
5193 (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
|
5194 (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
|
5195 "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
|
5196 (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
|
5197 nil))) |
17493 | 5198 ;; Check the length of the signature. |
5199 (message-check 'signature | |
100993 | 5200 (let (sig-start sig-end) |
5201 (goto-char (point-max)) | |
5202 (if (not (re-search-backward message-signature-separator nil t)) | |
5203 t | |
5204 (setq sig-start (1+ (point-at-eol))) | |
5205 (setq sig-end | |
5206 (if (re-search-forward | |
5207 "<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t) | |
5208 (- (point-at-bol) 1) | |
5209 (point-max))) | |
5210 (if (>= (count-lines sig-start sig-end) 5) | |
5211 (if (message-gnksa-enable-p 'signature) | |
5212 (y-or-n-p | |
5213 (format "Signature is excessively long (%d lines). Really post? " | |
5214 (count-lines sig-start sig-end))) | |
5215 (message "Denied posting -- Excessive signature.") | |
5216 nil) | |
5217 t)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5218 ;; 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
|
5219 (message-check 'quoting-style |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5220 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5221 (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
|
5222 (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
|
5223 (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
|
5224 (if no-problem |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5225 t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5226 (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
|
5227 (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
|
5228 ;; Ensure that |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5229 (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
|
5230 (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
|
5231 (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
|
5232 (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
|
5233 (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
|
5234 (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
|
5235 nil))))))) |
17493 | 5236 |
5237 (defun message-checksum () | |
5238 "Return a \"checksum\" for the current buffer." | |
5239 (let ((sum 0)) | |
5240 (save-excursion | |
5241 (goto-char (point-min)) | |
5242 (re-search-forward | |
5243 (concat "^" (regexp-quote mail-header-separator) "$")) | |
5244 (while (not (eobp)) | |
5245 (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
|
5246 (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
|
5247 (char-after)))) |
17493 | 5248 (forward-char 1))) |
5249 sum)) | |
5250 | |
5251 (defun message-do-fcc () | |
5252 "Process Fcc headers in the current buffer." | |
5253 (let ((case-fold-search t) | |
5254 (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
|
5255 list file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5256 (mml-externalize-attachments message-fcc-externalize-attachments)) |
17493 | 5257 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5258 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5259 (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
|
5260 (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
|
5261 (when file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5262 (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
|
5263 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5264 (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
|
5265 (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
|
5266 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5267 (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
|
5268 (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
|
5269 (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
|
5270 (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
|
5271 (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
|
5272 (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
|
5273 (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
|
5274 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
|
5275 (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
|
5276 (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
|
5277 (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
|
5278 (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
|
5279 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5280 (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
|
5281 ;; 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
|
5282 (while list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5283 (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
|
5284 (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
|
5285 ;; 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
|
5286 (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
|
5287 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
|
5288 (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
|
5289 ;; 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
|
5290 (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
|
5291 (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
|
5292 (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
|
5293 (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
|
5294 (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
|
5295 (funcall message-fcc-handler-function file) |
102061 | 5296 ;; FIXME this option, rmail-output (also used if |
5297 ;; message-fcc-handler-function is nil) is not | |
5298 ;; documented anywhere AFAICS. It should work in Emacs | |
5299 ;; 23; I suspect it does not work in Emacs 22. | |
5300 ;; FIXME I don't see the need for the two different cases here. | |
5301 ;; mail-use-rfc822 makes no difference (in Emacs 23),and | |
5302 ;; the third argument just controls \"Wrote file\" message. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5303 (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
|
5304 (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
|
5305 (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
|
5306 (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
|
5307 (kill-buffer (current-buffer)))))) |
17493 | 5308 |
5309 (defun message-output (filename) | |
35147 | 5310 "Append this article to Unix/babyl mail file FILENAME." |
17493 | 5311 (if (and (file-readable-p filename) |
5312 (mail-file-babyl-p filename)) | |
5313 (gnus-output-to-rmail filename t) | |
5314 (gnus-output-to-mail filename t))) | |
5315 | |
5316 (defun message-cleanup-headers () | |
5317 "Do various automatic cleanups of the headers." | |
5318 ;; Remove empty lines in the header. | |
5319 (save-restriction | |
5320 (message-narrow-to-headers) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5321 ;; Remove blank lines. |
17493 | 5322 (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
|
5323 (replace-match "" t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5324 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5325 ;; 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
|
5326 ;; 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
|
5327 ;; embedded line breaks. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5328 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5329 (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
|
5330 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5331 (narrow-to-region |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5332 (point) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5333 (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
|
5334 (match-beginning 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5335 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5336 (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5337 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5338 (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
|
5339 (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
|
5340 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5341 (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
|
5342 (replace-match "," t t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5343 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5344 ;; Remove trailing commas. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5345 (when (re-search-forward ",+$" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5346 (replace-match "" t t)))))) |
17493 | 5347 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5348 (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
|
5349 "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
|
5350 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
|
5351 (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
|
5352 (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
|
5353 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5354 (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
|
5355 "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
|
5356 (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
|
5357 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5358 (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
|
5359 (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
|
5360 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5361 (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
|
5362 "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
|
5363 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5364 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
|
5365 (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
|
5366 (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
|
5367 (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
|
5368 (message-make-date (apply 'encode-time cur)))) |
17493 | 5369 |
5370 (defun message-make-message-id () | |
5371 "Make a unique Message-ID." | |
5372 (concat "<" (message-unique-id) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5373 (let ((psubject (save-excursion (message-fetch-field "subject"))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5374 (psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5375 (save-excursion (message-fetch-field "supersedes")))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5376 (if (or |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5377 (and message-reply-headers |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5378 (mail-header-references message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5379 (mail-header-subject message-reply-headers) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5380 psubject |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5381 (not (string= |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5382 (message-strip-subject-re |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5383 (mail-header-subject message-reply-headers)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5384 (message-strip-subject-re psubject)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5385 (and psupersedes |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5386 (string-match "_-_@" psupersedes))) |
17493 | 5387 "_-_" "")) |
5388 "@" (message-make-fqdn) ">")) | |
5389 | |
5390 (defvar message-unique-id-char nil) | |
5391 | |
5392 ;; If you ever change this function, make sure the new version | |
5393 ;; cannot generate IDs that the old version could. | |
5394 ;; You might for example insert a "." somewhere (not next to another dot | |
5395 ;; or string boundary), or modify the "fsf" string. | |
5396 (defun message-unique-id () | |
5397 ;; Don't use microseconds from (current-time), they may be unsupported. | |
5398 ;; Instead we use this randomly inited counter. | |
5399 (setq message-unique-id-char | |
5400 (% (1+ (or message-unique-id-char (logand (random t) (1- (lsh 1 20))))) | |
5401 ;; (current-time) returns 16-bit ints, | |
5402 ;; and 2^16*25 just fits into 4 digits i base 36. | |
5403 (* 25 25))) | |
5404 (let ((tm (current-time))) | |
5405 (concat | |
97142 | 5406 (if (or (memq system-type '(ms-dos emx)) |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
5407 ;; 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
|
5408 (floatp (user-uid))) |
17493 | 5409 (let ((user (downcase (user-login-name)))) |
5410 (while (string-match "[^a-z0-9_]" user) | |
5411 (aset user (match-beginning 0) ?_)) | |
5412 user) | |
5413 (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
|
5414 (message-number-base36 (+ (car tm) |
17493 | 5415 (lsh (% message-unique-id-char 25) 16)) 4) |
5416 (message-number-base36 (+ (nth 1 tm) | |
5417 (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
|
5418 ;; 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
|
5419 ;; 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
|
5420 ;; the same ID via another algorithm. |
17493 | 5421 ".fsf"))) |
5422 | |
5423 (defun message-number-base36 (num len) | |
5424 (if (if (< len 0) | |
5425 (<= num 0) | |
5426 (= len 0)) | |
5427 "" | |
5428 (concat (message-number-base36 (/ num 36) (1- len)) | |
5429 (char-to-string (aref "zyxwvutsrqponmlkjihgfedcba9876543210" | |
5430 (% num 36)))))) | |
5431 | |
5432 (defun message-make-organization () | |
5433 "Make an Organization header." | |
5434 (let* ((organization | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5435 (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
|
5436 (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
|
5437 (funcall message-user-organization) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
5438 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
|
5439 (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
|
5440 (mm-enable-multibyte) |
17493 | 5441 (cond ((stringp organization) |
5442 (insert organization)) | |
5443 ((and (eq t organization) | |
5444 message-user-organization-file | |
5445 (file-exists-p message-user-organization-file)) | |
5446 (insert-file-contents message-user-organization-file))) | |
5447 (goto-char (point-min)) | |
5448 (while (re-search-forward "[\t\n]+" nil t) | |
5449 (replace-match "" t t)) | |
5450 (unless (zerop (buffer-size)) | |
5451 (buffer-string))))) | |
5452 | |
5453 (defun message-make-lines () | |
5454 "Count the number of lines and return numeric string." | |
5455 (save-excursion | |
5456 (save-restriction | |
5457 (widen) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5458 (message-goto-body) |
17493 | 5459 (int-to-string (count-lines (point) (point-max)))))) |
5460 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5461 (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
|
5462 "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
|
5463 (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
|
5464 (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
|
5465 (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
|
5466 (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
|
5467 (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
|
5468 (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
|
5469 nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5470 |
17493 | 5471 (defun message-make-in-reply-to () |
5472 "Return the In-Reply-To header for this message." | |
5473 (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
|
5474 (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
|
5475 (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
|
5476 (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
|
5477 (when from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5478 (let ((name (mail-extract-address-components from))) |
76267 | 5479 (concat |
5480 msg-id (if msg-id " (") | |
5481 (if (car name) | |
5482 (if (string-match "[^\000-\177]" (car name)) | |
5483 ;; Quote a string containing non-ASCII characters. | |
5484 ;; It will make the RFC2047 encoder cause an error | |
5485 ;; 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
|
5486 (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
|
5487 (insert (car name)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5488 (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
|
5489 (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
|
5490 (when (prog2 |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5491 (backward-char) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5492 (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
|
5493 (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
|
5494 (insert "\\")) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5495 (forward-char)) |
789028492ded
(message-make-in-reply-to): Use mm-with-multibyte-buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93386
diff
changeset
|
5496 ;; 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
|
5497 (concat "\"" (buffer-string) "\"")) |
76267 | 5498 (car name)) |
5499 (nth 1 name)) | |
5500 "'s message of \"" | |
5501 (if (or (not date) (string= date "")) | |
5502 "(unknown date)" date) | |
5503 "\"" (if msg-id ")"))))))) | |
17493 | 5504 |
5505 (defun message-make-distribution () | |
5506 "Make a Distribution header." | |
5507 (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
|
5508 (cond ((functionp message-distribution-function) |
17493 | 5509 (funcall message-distribution-function)) |
5510 (t orig-distribution)))) | |
5511 | |
5512 (defun message-make-expires () | |
5513 "Return an Expires header based on `message-expires'." | |
5514 (let ((current (current-time)) | |
5515 (future (* 1.0 message-expires 60 60 24))) | |
5516 ;; Add the future to current. | |
5517 (setcar current (+ (car current) (round (/ future (expt 2 16))))) | |
5518 (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
|
5519 (message-make-date current))) |
17493 | 5520 |
5521 (defun message-make-path () | |
5522 "Return uucp path." | |
5523 (let ((login-name (user-login-name))) | |
5524 (cond ((null message-user-path) | |
5525 (concat (system-name) "!" login-name)) | |
5526 ((stringp message-user-path) | |
5527 ;; Support GENERICPATH. Suggested by vixie@decwrl.dec.com. | |
5528 (concat message-user-path "!" login-name)) | |
5529 (t login-name)))) | |
5530 | |
85888 | 5531 (defun message-make-from (&optional name address) |
17493 | 5532 "Make a From header." |
5533 (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
|
5534 (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
|
5535 (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
|
5536 (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
|
5537 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
|
5538 (user-full-name)))) |
17493 | 5539 (when (string= fullname "&") |
5540 (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
|
5541 (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
|
5542 (mm-enable-multibyte) |
17493 | 5543 (cond |
5544 ((or (null style) | |
5545 (equal fullname "")) | |
5546 (insert login)) | |
5547 ((or (eq style 'angles) | |
5548 (and (not (eq style 'parens)) | |
5549 ;; Use angles if no quoting is needed, or if parens would | |
5550 ;; need quoting too. | |
5551 (or (not (string-match "[^- !#-'*+/-9=?A-Z^-~]" fullname)) | |
5552 (let ((tmp (concat fullname nil))) | |
5553 (while (string-match "([^()]*)" tmp) | |
5554 (aset tmp (match-beginning 0) ?-) | |
5555 (aset tmp (1- (match-end 0)) ?-)) | |
5556 (string-match "[\\()]" tmp))))) | |
5557 (insert fullname) | |
5558 (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
|
5559 ;; 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
|
5560 ;; 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
|
5561 (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
|
5562 ;; 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
|
5563 (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
|
5564 (insert "\"") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5565 (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
|
5566 (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
|
5567 (insert "\"")) |
17493 | 5568 (insert " <" login ">")) |
5569 (t ; 'parens or default | |
5570 (insert login " (") | |
5571 (let ((fullname-start (point))) | |
5572 (insert fullname) | |
5573 (goto-char fullname-start) | |
5574 ;; RFC 822 says \ and nonmatching parentheses | |
5575 ;; must be escaped in comments. | |
5576 ;; Escape every instance of ()\ ... | |
5577 (while (re-search-forward "[()\\]" nil 1) | |
5578 (replace-match "\\\\\\&" t)) | |
5579 ;; ... then undo escaping of matching parentheses, | |
5580 ;; including matching nested parentheses. | |
5581 (goto-char fullname-start) | |
5582 (while (re-search-forward | |
5583 "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" | |
5584 nil 1) | |
5585 (replace-match "\\1(\\3)" t) | |
5586 (goto-char fullname-start))) | |
5587 (insert ")"))) | |
5588 (buffer-string)))) | |
5589 | |
5590 (defun message-make-sender () | |
5591 "Return the \"real\" user address. | |
5592 This function tries to ignore all user modifications, and | |
5593 give as trustworthy answer as possible." | |
5594 (concat (user-login-name) "@" (system-name))) | |
5595 | |
5596 (defun message-make-address () | |
5597 "Make the address of the user." | |
5598 (or (message-user-mail-address) | |
5599 (concat (user-login-name) "@" (message-make-domain)))) | |
5600 | |
5601 (defun message-user-mail-address () | |
5602 "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
|
5603 (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
|
5604 (string-match "@.*\\." user-mail-address)) |
17493 | 5605 (if (string-match " " user-mail-address) |
5606 (nth 1 (mail-extract-address-components user-mail-address)) | |
5607 user-mail-address))) | |
5608 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5609 (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
|
5610 "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
|
5611 (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
|
5612 (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
|
5613 (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
|
5614 ((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
|
5615 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
|
5616 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5617 (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
|
5618 |
17493 | 5619 (defun message-make-fqdn () |
5620 "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
|
5621 (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
|
5622 (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
|
5623 (user-domain |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5624 (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
|
5625 (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
|
5626 (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
|
5627 (case-fold-search t)) |
17493 | 5628 (cond |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5629 ((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
|
5630 (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
|
5631 (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
|
5632 (not (string-match message-bogus-system-names message-user-fqdn))) |
74984 | 5633 ;; `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
|
5634 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
|
5635 ((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
|
5636 (not (string-match message-bogus-system-names system-name))) |
17493 | 5637 ;; `system-name' returned the right result. |
5638 system-name) | |
5639 ;; Try `mail-host-address'. | |
5640 ((and (boundp 'mail-host-address) | |
5641 (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
|
5642 (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
|
5643 (not (string-match message-bogus-system-names mail-host-address))) |
17493 | 5644 mail-host-address) |
5645 ;; 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
|
5646 ((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
|
5647 (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
|
5648 (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
|
5649 (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
|
5650 user-domain) |
17493 | 5651 ;; Default to this bogus thing. |
5652 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5653 (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
|
5654 ".i-did-not-set--mail-host-address--so-tickle-me"))))) |
17493 | 5655 |
5656 (defun message-make-host-name () | |
5657 "Return the name of the host." | |
5658 (let ((fqdn (message-make-fqdn))) | |
5659 (string-match "^[^.]+\\." fqdn) | |
5660 (substring fqdn 0 (1- (match-end 0))))) | |
5661 | |
5662 (defun message-make-domain () | |
5663 "Return the domain name." | |
5664 (or mail-host-address | |
5665 (message-make-fqdn))) | |
5666 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5667 (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
|
5668 "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
|
5669 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
|
5670 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5671 (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
|
5672 (when listaddr |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5673 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5674 (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
|
5675 (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
|
5676 (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
|
5677 (insert listaddr))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5678 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5679 (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
|
5680 "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
|
5681 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
|
5682 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
|
5683 (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
|
5684 (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
|
5685 (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
|
5686 (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
|
5687 (recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5688 (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
|
5689 (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
|
5690 (file-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5691 (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
|
5692 (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
|
5693 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5694 (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
|
5695 (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
|
5696 (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
|
5697 (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
|
5698 (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
|
5699 (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
|
5700 (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
|
5701 (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
|
5702 (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
|
5703 (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
|
5704 (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
|
5705 (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
|
5706 (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
|
5707 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
|
5708 file-regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5709 (mapcar 'funcall |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5710 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
|
5711 (save-match-data |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
5712 (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
|
5713 (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
|
5714 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
|
5715 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
|
5716 return recipient))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5717 (when list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5718 (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
|
5719 list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5720 msg-recipients)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5721 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5722 (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
|
5723 "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
|
5724 (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
|
5725 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
|
5726 (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
|
5727 (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
|
5728 (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
|
5729 (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) "")) |
100197
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5730 (mapcar 'downcase |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
5731 (mapcar |
98398 | 5732 'cadr |
5733 (mail-extract-address-components field t)))))) | |
100197
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5734 ;; Note that `rhs' will be "" if the address does not have |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5735 ;; the domain part, i.e., if it is a local user's address. |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5736 (setq ace (if (string-match "\\`[[:ascii:]]*\\'" rhs) |
87097 | 5737 rhs |
5738 (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
|
5739 (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
|
5740 (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
|
5741 (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
|
5742 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
|
5743 (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
|
5744 (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
|
5745 (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
|
5746 (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
|
5747 (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
|
5748 (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
|
5749 (widen))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5750 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5751 (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
|
5752 "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
|
5753 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
|
5754 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5755 (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
|
5756 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5757 (save-restriction |
100197
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5758 ;; `message-narrow-to-head' that recognizes only the first empty |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5759 ;; line as the message header separator used to be used here. |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5760 ;; However, since there is the "--text follows this line--" line |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5761 ;; normally, it failed in narrowing to the headers and potentially |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5762 ;; caused the IDNA encoding on lines that look like headers in |
3076f8588570
(message-idna-to-ascii-rhs-1): Fix previous commit.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
100142
diff
changeset
|
5763 ;; the message body. |
100137
f3e7e60dc941
(message-idna-to-ascii-rhs): Use message-narrow-to-headers-or-head rather than
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
99777
diff
changeset
|
5764 (message-narrow-to-headers-or-head) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5765 (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
|
5766 (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
|
5767 (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
|
5768 (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
|
5769 (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
|
5770 (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
|
5771 |
17493 | 5772 (defun message-generate-headers (headers) |
5773 "Prepare article HEADERS. | |
5774 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
|
5775 (setq headers (append headers message-required-headers)) |
17493 | 5776 (save-restriction |
5777 (message-narrow-to-headers) | |
5778 (let* ((Date (message-make-date)) | |
5779 (Message-ID (message-make-message-id)) | |
5780 (Organization (message-make-organization)) | |
5781 (From (message-make-from)) | |
5782 (Path (message-make-path)) | |
5783 (Subject nil) | |
5784 (Newsgroups nil) | |
5785 (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
|
5786 (References (message-make-references)) |
17493 | 5787 (To nil) |
5788 (Distribution (message-make-distribution)) | |
5789 (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
|
5790 (User-Agent message-newsreader) |
17493 | 5791 (Expires (message-make-expires)) |
5792 (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
|
5793 (optionalp nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5794 header value elem header-string) |
17493 | 5795 ;; First we remove any old generated headers. |
5796 (let ((headers message-deletable-headers)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5797 (unless (buffer-modified-p) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
5798 (setq headers (delq 'Message-ID (copy-sequence headers)))) |
17493 | 5799 (while headers |
5800 (goto-char (point-min)) | |
5801 (and (re-search-forward | |
5802 (concat "^" (symbol-name (car headers)) ": *") nil t) | |
5803 (get-text-property (1+ (match-beginning 0)) 'message-deletable) | |
5804 (message-delete-line)) | |
5805 (pop headers))) | |
5806 ;; Go through all the required headers and see if they are in the | |
5807 ;; articles already. If they are not, or are empty, they are | |
5808 ;; inserted automatically - except for Subject, Newsgroups and | |
5809 ;; Distribution. | |
5810 (while headers | |
5811 (goto-char (point-min)) | |
5812 (setq elem (pop headers)) | |
5813 (if (consp elem) | |
5814 (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
|
5815 (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
|
5816 optionalp t) |
17493 | 5817 (setq header (car elem))) |
5818 (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
|
5819 (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
|
5820 header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5821 (symbol-name header))) |
17493 | 5822 (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
|
5823 (concat "^" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5824 (regexp-quote (downcase header-string)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5825 ":") |
17493 | 5826 nil t)) |
5827 (progn | |
5828 ;; The header was found. We insert a space after the | |
5829 ;; 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
|
5830 (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
|
5831 ;; 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
|
5832 (looking-at "[ \t]*\n[^ \t]"))) |
17493 | 5833 ;; So we find out what value we should insert. |
5834 (setq value | |
5835 (cond | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5836 ((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
|
5837 (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
|
5838 (not (member header-string message-inserted-headers))) |
17493 | 5839 ;; This is an optional header. If the cdr of this |
5840 ;; is something that is nil, then we do not insert | |
5841 ;; this header. | |
5842 (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
|
5843 (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
|
5844 (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
|
5845 (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
|
5846 (symbol-value (cdr elem))))) |
17493 | 5847 ((consp elem) |
5848 ;; The element is a cons. Either the cdr is a | |
5849 ;; string to be inserted verbatim, or it is a | |
5850 ;; function, and we insert the value returned from | |
5851 ;; 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
|
5852 (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
|
5853 (cdr elem)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5854 (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
|
5855 (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
|
5856 ((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
|
5857 (symbol-value header)) |
17493 | 5858 ;; The element is a symbol. We insert the value |
5859 ;; of this symbol, if any. | |
5860 (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
|
5861 ((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
|
5862 (intern (downcase (symbol-name header))))) |
17493 | 5863 ;; We couldn't generate a value for this header, |
5864 ;; so we just ask the user. | |
5865 (read-from-minibuffer | |
5866 (format "Empty header for %s; enter value: " header))))) | |
5867 ;; Finally insert the header. | |
5868 (when (and value | |
5869 (not (equal value ""))) | |
5870 (save-excursion | |
5871 (if (bolp) | |
5872 (progn | |
5873 ;; This header didn't exist, so we insert it. | |
5874 (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
|
5875 (let ((formatter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5876 (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
|
5877 (if formatter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5878 (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
|
5879 (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
|
5880 (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
|
5881 ;; 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
|
5882 ;; 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
|
5883 (unless (bolp) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5884 (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
|
5885 (forward-line -1))) |
17493 | 5886 ;; The value of this header was empty, so we clear |
5887 ;; 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
|
5888 (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
|
5889 ;; 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
|
5890 ;; 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
|
5891 (unless optionalp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5892 (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
|
5893 (insert value) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5894 (message-fill-field))) |
17493 | 5895 ;; Add the deletable property to the headers that require it. |
5896 (and (memq header message-deletable-headers) | |
5897 (progn (beginning-of-line) (looking-at "[^:]+: ")) | |
5898 (add-text-properties | |
5899 (point) (match-end 0) | |
5900 '(message-deletable t face italic) (current-buffer))))))) | |
5901 ;; Insert new Sender if the From is strange. | |
5902 (let ((from (message-fetch-field "from")) | |
5903 (sender (message-fetch-field "sender")) | |
5904 (secure-sender (message-make-sender))) | |
5905 (when (and from | |
5906 (not (message-check-element 'sender)) | |
5907 (not (string= | |
5908 (downcase | |
5909 (cadr (mail-extract-address-components from))) | |
5910 (downcase secure-sender))) | |
5911 (or (null sender) | |
5912 (not | |
5913 (string= | |
5914 (downcase | |
5915 (cadr (mail-extract-address-components sender))) | |
5916 (downcase secure-sender))))) | |
5917 (goto-char (point-min)) | |
5918 ;; Rename any old Sender headers to Original-Sender. | |
5919 (when (re-search-forward "^\\(Original-\\)*Sender:" nil t) | |
5920 (beginning-of-line) | |
5921 (insert "Original-") | |
5922 (beginning-of-line)) | |
5923 (when (or (message-news-p) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
5924 (string-match "@.+\\.." secure-sender)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5925 (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
|
5926 ;; 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
|
5927 (message-idna-to-ascii-rhs)))) |
17493 | 5928 |
5929 (defun message-insert-courtesy-copy () | |
5930 "Insert a courtesy message in mail copies of combined messages." | |
5931 (let (newsgroups) | |
5932 (save-excursion | |
5933 (save-restriction | |
5934 (message-narrow-to-headers) | |
5935 (when (setq newsgroups (message-fetch-field "newsgroups")) | |
5936 (goto-char (point-max)) | |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
5937 (insert "Posted-To: " newsgroups "\n"))) |
17493 | 5938 (forward-line 1) |
5939 (when message-courtesy-message | |
5940 (cond | |
5941 ((string-match "%s" message-courtesy-message) | |
5942 (insert (format message-courtesy-message newsgroups))) | |
5943 (t | |
5944 (insert message-courtesy-message))))))) | |
5945 | |
5946 ;;; | |
5947 ;;; Setting up a message buffer | |
5948 ;;; | |
5949 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5950 (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
|
5951 (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
|
5952 (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
|
5953 (point))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5954 quoted char) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5955 (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
|
5956 (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
|
5957 (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
|
5958 (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
|
5959 quoted)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5960 (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
|
5961 (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
|
5962 (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
|
5963 (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
|
5964 (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
|
5965 (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
|
5966 |
17493 | 5967 (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
|
5968 (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
|
5969 ": " |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5970 (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
|
5971 "\n") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5972 (message-fill-field-address)) |
17493 | 5973 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5974 (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
|
5975 "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
|
5976 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
|
5977 (interactive "*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5978 (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
|
5979 (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
|
5980 (error |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
5981 (split-line)))) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59756
diff
changeset
|
5982 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5983 (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
|
5984 (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
|
5985 ": " |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5986 (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
|
5987 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5988 (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
|
5989 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5990 (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
|
5991 (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
|
5992 (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
|
5993 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5994 (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
|
5995 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5996 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
5997 (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
|
5998 (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
|
5999 (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
|
6000 '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
|
6001 (point-max)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6002 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6003 (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
|
6004 (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
|
6005 (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
|
6006 (let (last) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6007 (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
|
6008 last) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6009 (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6010 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6011 (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
|
6012 (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
|
6013 (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
|
6014 (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
|
6015 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6016 (defun message-fill-field-general () |
17493 | 6017 (let ((begin (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6018 (fill-column 78) |
17493 | 6019 (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
|
6020 (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
|
6021 (not (eobp))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6022 (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
|
6023 (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
|
6024 ;; 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
|
6025 (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
|
6026 (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
|
6027 (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
|
6028 (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
|
6029 (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
|
6030 (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
|
6031 (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
|
6032 (goto-char (point-max)))) |
17493 | 6033 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6034 (defun message-shorten-1 (list cut surplus) |
35147 | 6035 "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
|
6036 (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
|
6037 (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
|
6038 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6039 (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
|
6040 "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
|
6041 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
|
6042 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
|
6043 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
|
6044 (let ((maxcount 21) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6045 (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
|
6046 (cut 2) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6047 refs) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6048 (with-temp-buffer |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6049 (insert references) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6050 (goto-char (point-min)) |
93386 | 6051 ;; Cons a list of valid references. GNKSA says we must not include MIDs |
6052 ;; with whitespace or missing brackets (7.a "Does not propagate broken | |
6053 ;; Message-IDs in original References"). | |
6054 (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
|
6055 (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
|
6056 (setq refs (nreverse refs) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6057 count (length refs))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6058 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6059 ;; 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
|
6060 ;; 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
|
6061 ;; elements that follow. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6062 (when (> count maxcount) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6063 (let ((surplus (- count maxcount))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6064 (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
|
6065 (decf count surplus))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6066 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6067 ;; 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
|
6068 ;; 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
|
6069 ;; 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
|
6070 ;; 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
|
6071 ;; |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6072 ;; 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
|
6073 ;; 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
|
6074 ;; |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6075 ;; 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
|
6076 ;; 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
|
6077 (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
|
6078 (while (< 998 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6079 (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
|
6080 (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
|
6081 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
|
6082 (buffer-size))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6083 (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
|
6084 ;; 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
|
6085 ;; 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
|
6086 (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
|
6087 |
17493 | 6088 (defun message-position-point () |
6089 "Move point to where the user probably wants to find it." | |
6090 (message-narrow-to-headers) | |
6091 (cond | |
6092 ((re-search-forward "^[^:]+:[ \t]*$" nil t) | |
6093 (search-backward ":" ) | |
6094 (widen) | |
6095 (forward-char 1) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6096 (if (eq (char-after) ? ) |
17493 | 6097 (forward-char 1) |
6098 (insert " "))) | |
6099 (t | |
6100 (goto-char (point-max)) | |
6101 (widen) | |
6102 (forward-line 1) | |
6103 (unless (looking-at "$") | |
6104 (forward-line 2))) | |
6105 (sit-for 0))) | |
6106 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6107 (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
|
6108 "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
|
6109 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
|
6110 :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
|
6111 :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
|
6112 :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
|
6113 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6114 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6115 (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
|
6116 "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
|
6117 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
|
6118 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6119 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
|
6120 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
|
6121 is nil. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6122 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6123 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
|
6124 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
|
6125 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
|
6126 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
|
6127 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
|
6128 (interactive "p") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6129 (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
|
6130 (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
|
6131 (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
|
6132 (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
|
6133 (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
|
6134 (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
|
6135 (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
|
6136 (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
|
6137 (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
|
6138 (goto-char |
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
6139 (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
|
6140 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
|
6141 (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
|
6142 |
17493 | 6143 (defun message-buffer-name (type &optional to group) |
6144 "Return a new (unique) buffer name based on TYPE and TO." | |
6145 (cond | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6146 ;; Generate a new buffer name The Message Way. |
76650 | 6147 ((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
|
6148 (generate-new-buffer-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6149 (concat "*" type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6150 (if to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6151 (concat " to " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6152 (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
|
6153 to) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6154 "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6155 (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
|
6156 "*"))) |
17493 | 6157 ;; Check whether `message-generate-new-buffers' is a function, |
6158 ;; 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
|
6159 ((functionp message-generate-new-buffers) |
17493 | 6160 (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
|
6161 ((eq message-generate-new-buffers 'unsent) |
17493 | 6162 (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
|
6163 (concat "*unsent " type |
17493 | 6164 (if to |
6165 (concat " to " | |
6166 (or (car (mail-extract-address-components to)) | |
6167 to) "") | |
6168 "") | |
6169 (if (and group (not (string= group ""))) (concat " on " group) "") | |
6170 "*"))) | |
76650 | 6171 ;; Search for the existing message buffer with the specified name. |
17493 | 6172 (t |
76650 | 6173 (let* ((new (if (eq message-generate-new-buffers 'standard) |
6174 (generate-new-buffer-name (concat "*" type " message*")) | |
6175 (let ((message-generate-new-buffers 'unique)) | |
6176 (message-buffer-name type to group)))) | |
6177 (regexp (concat "\\`" | |
6178 (regexp-quote | |
6179 (if (string-match "<[0-9]+>\\'" new) | |
6180 (substring new 0 (match-beginning 0)) | |
6181 new)) | |
6182 "\\(?:<\\([0-9]+\\)>\\)?\\'")) | |
6183 (case-fold-search nil)) | |
6184 (or (cdar | |
6185 (last | |
6186 (sort | |
6187 (delq nil | |
6188 (mapcar | |
6189 (lambda (b) | |
6190 (when (and (string-match regexp (setq b (buffer-name b))) | |
6191 (eq (with-current-buffer b major-mode) | |
6192 'message-mode)) | |
6193 (cons (string-to-number (or (match-string 1 b) "1")) | |
6194 b))) | |
6195 (buffer-list))) | |
6196 'car-less-than-car))) | |
6197 new))))) | |
17493 | 6198 |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6199 (defun message-pop-to-buffer (name &optional switch-function) |
17493 | 6200 "Pop to buffer NAME, and warn if it already exists and is modified." |
6201 (let ((buffer (get-buffer name))) | |
6202 (if (and buffer | |
6203 (buffer-name buffer)) | |
76650 | 6204 (let ((window (get-buffer-window buffer 0))) |
6205 (if window | |
6206 ;; Raise the frame already displaying the message buffer. | |
6207 (progn | |
6208 (gnus-select-frame-set-input-focus (window-frame window)) | |
6209 (select-window window)) | |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6210 (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
|
6211 (set-buffer buffer)) |
17493 | 6212 (when (and (buffer-modified-p) |
76650 | 6213 (not (prog1 |
6214 (y-or-n-p | |
6215 "Message already being composed; erase? ") | |
6216 (message nil)))) | |
17493 | 6217 (error "Message being composed"))) |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6218 (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
|
6219 (set-buffer name)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6220 (erase-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6221 (message-mode))) |
17493 | 6222 |
6223 (defun message-do-send-housekeeping () | |
6224 "Kill old message buffers." | |
6225 ;; We might have sent this buffer already. Delete it from the | |
6226 ;; list of buffers. | |
6227 (setq message-buffer-list (delq (current-buffer) message-buffer-list)) | |
6228 (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
|
6229 message-buffer-list |
17493 | 6230 (>= (length message-buffer-list) message-max-buffers)) |
6231 ;; Kill the oldest buffer -- unless it has been changed. | |
6232 (let ((buffer (pop message-buffer-list))) | |
6233 (when (and (buffer-name buffer) | |
6234 (not (buffer-modified-p buffer))) | |
6235 (kill-buffer buffer)))) | |
6236 ;; Rename the buffer. | |
6237 (if message-send-rename-function | |
6238 (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
|
6239 ;; 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
|
6240 (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
|
6241 "\\`\\*\\(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
|
6242 (buffer-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6243 (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
|
6244 to group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6245 (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
|
6246 (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
|
6247 (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
|
6248 (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
|
6249 (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
|
6250 (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
|
6251 (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
|
6252 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6253 (setq name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6254 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6255 (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
|
6256 (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
|
6257 to) "*")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6258 ((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
|
6259 (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
|
6260 (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
|
6261 (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
|
6262 (rename-buffer name t))))) |
17493 | 6263 ;; Push the current buffer onto the list. |
6264 (when message-max-buffers | |
6265 (setq message-buffer-list | |
6266 (nconc message-buffer-list (list (current-buffer)))))) | |
6267 | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6268 (defun message-mail-user-agent () |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6269 (let ((mua (cond |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6270 ((not message-mail-user-agent) nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6271 ((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
|
6272 (t message-mail-user-agent)))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6273 (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
|
6274 nil |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6275 mua))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6276 |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6277 ;; YANK-ACTION, if non-nil, can be a buffer or a yank action of the |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6278 ;; form (FUNCTION . ARGS). |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6279 (defun message-setup (headers &optional yank-action actions |
76650 | 6280 continue switch-function) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6281 (let ((mua (message-mail-user-agent)) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6282 subject to field) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6283 (if (not (and message-this-is-mail mua)) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6284 (message-setup-1 headers yank-action actions) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6285 (setq headers (copy-sequence headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6286 (setq field (assq 'Subject headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6287 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6288 (setq subject (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6289 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6290 (setq field (assq 'To headers)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6291 (when field |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6292 (setq to (cdr field)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6293 (setq headers (delq field headers))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6294 (let ((mail-user-agent mua)) |
35147 | 6295 (compose-mail to subject |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6296 (mapcar (lambda (item) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6297 (cons |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6298 (format "%s" (car item)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6299 (cdr item))) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6300 headers) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6301 continue switch-function |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6302 (if (bufferp yank-action) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6303 (list 'insert-buffer yank-action) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6304 yank-action) |
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6305 actions))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
6306 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6307 (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
|
6308 "Return a list that includes all headers from HEADERS. |
73487 | 6309 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
|
6310 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
|
6311 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
|
6312 (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
|
6313 header-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6314 (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
|
6315 (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
|
6316 ((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
|
6317 (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
|
6318 ;; 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
|
6319 (cdr header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6320 ((consp header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6321 ;; 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
|
6322 (car header)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6323 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6324 ;; 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
|
6325 header))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6326 (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
|
6327 (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
|
6328 (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
|
6329 (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
|
6330 (nreverse result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6331 |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6332 (defun message-setup-1 (headers &optional yank-action actions) |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6333 (dolist (action actions) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6334 (condition-case nil |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
6335 (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
|
6336 `(apply ',(car action) ',(cdr action))))) |
106892
2bef3a4193f8
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106890
diff
changeset
|
6337 (setq message-reply-buffer |
2bef3a4193f8
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106890
diff
changeset
|
6338 (if (and (consp yank-action) |
2bef3a4193f8
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106890
diff
changeset
|
6339 (eq (car yank-action) 'insert-buffer)) |
2bef3a4193f8
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106890
diff
changeset
|
6340 (nth 1 yank-action) |
2bef3a4193f8
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106890
diff
changeset
|
6341 yank-action)) |
17493 | 6342 (goto-char (point-min)) |
6343 ;; Insert all the headers. | |
6344 (mail-header-format | |
6345 (let ((h headers) | |
6346 (alist message-header-format-alist)) | |
6347 (while h | |
6348 (unless (assq (caar h) message-header-format-alist) | |
6349 (push (list (caar h)) alist)) | |
6350 (pop h)) | |
6351 alist) | |
6352 headers) | |
6353 (delete-region (point) (progn (forward-line -1) (point))) | |
6354 (when message-default-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6355 (insert message-default-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6356 (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
|
6357 (insert mail-header-separator "\n") |
17493 | 6358 (forward-line -1) |
6359 (when (message-news-p) | |
6360 (when message-default-news-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6361 (insert message-default-news-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6362 (or (bolp) (insert ?\n))) |
17493 | 6363 (when message-generate-headers-first |
6364 (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
|
6365 (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
|
6366 (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
|
6367 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
|
6368 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
|
6369 '(Lines Subject))))) |
17493 | 6370 (when (message-mail-p) |
6371 (when message-default-mail-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6372 (insert message-default-mail-headers) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6373 (or (bolp) (insert ?\n))) |
17493 | 6374 (when message-generate-headers-first |
6375 (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
|
6376 (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
|
6377 (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
|
6378 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
|
6379 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
|
6380 '(Lines Subject))))) |
17493 | 6381 (run-hooks 'message-signature-setup-hook) |
6382 (message-insert-signature) | |
6383 (save-restriction | |
6384 (message-narrow-to-headers) | |
6385 (run-hooks 'message-header-setup-hook)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
6386 (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
|
6387 (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
|
6388 ;; 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
|
6389 (mail-add-payment-async)) |
93386 | 6390 ;; Gnus posting styles are applied via buffer-local `message-setup-hook' |
6391 ;; values. | |
17493 | 6392 (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
|
6393 ;; 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
|
6394 (when (message-mail-p) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6395 (save-restriction |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6396 (message-narrow-to-headers) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6397 (if message-alternative-emails |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
6398 (message-use-alternative-email-as-from)))) |
17493 | 6399 (message-position-point) |
93386 | 6400 ;; Allow correct handling of `message-checksum' in `message-yank-original': |
6401 (set-buffer-modified-p nil) | |
17493 | 6402 (undo-boundary)) |
6403 | |
6404 (defun message-set-auto-save-file-name () | |
6405 "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
|
6406 (when message-auto-save-directory |
34057
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
6407 (unless (file-directory-p |
98bd49d8cf7d
(message-auto-save-directory): Use
Dave Love <fx@gnu.org>
parents:
33982
diff
changeset
|
6408 (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
|
6409 (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
|
6410 (if (gnus-alive-p) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6411 (setq message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6412 (nndraft-request-associate-buffer "drafts")) |
98344 | 6413 |
6414 ;; If Gnus were alive, draft messages would be saved in the drafts folder. | |
6415 ;; But Gnus is not alive, so arrange to save the draft message in a | |
6416 ;; regular file in message-auto-save-directory. Append a unique | |
6417 ;; time-based suffix to the filename to allow multiple drafts to be saved | |
6418 ;; simultaneously without overwriting each other (which mimics the | |
6419 ;; functionality of the Gnus drafts folder). | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6420 (setq buffer-file-name (expand-file-name |
98344 | 6421 (concat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6422 (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
|
6423 '(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
|
6424 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
|
6425 mswindows)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6426 "message" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6427 "*message*") |
98344 | 6428 (format-time-string "-%Y%m%d-%H%M%S")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6429 message-auto-save-directory)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6430 (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
|
6431 (clear-visited-file-modtime) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6432 (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
|
6433 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6434 (defun message-disassociate-draft () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6435 "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
|
6436 (when message-draft-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6437 (nndraft-request-expire-articles |
95580 | 6438 (list message-draft-article) "drafts" nil t))) |
17493 | 6439 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6440 (defun message-insert-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6441 "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
|
6442 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6443 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6444 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6445 (message-narrow-to-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6446 (when (message-news-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6447 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6448 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6449 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6450 (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
|
6451 (when (message-mail-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6452 (message-generate-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6453 (delq 'Lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6454 (delq 'Subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6455 (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
|
6456 |
17493 | 6457 |
6458 | |
6459 ;;; | |
6460 ;;; Commands for interfacing with message | |
6461 ;;; | |
6462 | |
6463 ;;;###autoload | |
6464 (defun message-mail (&optional to subject | |
6465 other-headers continue switch-function | |
6466 yank-action send-actions) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6467 "Start editing a mail message to be sent. |
76650 | 6468 OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether |
6469 to continue editing a message already being composed. SWITCH-FUNCTION | |
6470 is a function used to switch to and display the mail buffer." | |
17493 | 6471 (interactive) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6472 (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
|
6473 (unless (message-mail-user-agent) |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6474 (message-pop-to-buffer |
76650 | 6475 ;; Search for the existing message buffer if `continue' is non-nil. |
6476 (let ((message-generate-new-buffers | |
6477 (when (or (not continue) | |
6478 (eq message-generate-new-buffers 'standard) | |
6479 (functionp message-generate-new-buffers)) | |
6480 message-generate-new-buffers))) | |
77819
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6481 (message-buffer-name "mail" to)) |
20662529a1ae
(message-pop-to-buffer): Add switch-function argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
77114
diff
changeset
|
6482 switch-function)) |
17493 | 6483 (message-setup |
6484 (nconc | |
6485 `((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
|
6486 (when other-headers other-headers)) |
106890
2ed4eab78ca3
* message.el (message-mail): Just pass yank-action on to message-setup.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6487 yank-action send-actions continue switch-function) |
34859
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6488 ;; FIXME: Should return nil if failure. |
596342378358
* message.el (message-mail): Support yank-action.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34858
diff
changeset
|
6489 t)) |
17493 | 6490 |
6491 ;;;###autoload | |
6492 (defun message-news (&optional newsgroups subject) | |
6493 "Start editing a news article to be sent." | |
6494 (interactive) | |
6495 (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
|
6496 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)) |
17493 | 6497 (message-setup `((Newsgroups . ,(or newsgroups "")) |
6498 (Subject . ,(or subject "")))))) | |
6499 | |
93386 | 6500 (defun message-alter-recipients-discard-bogus-full-name (addrcell) |
6501 "Discard mail address in full names. | |
6502 When the full name in reply headers contains the mail | |
6503 address (e.g. \"foo@bar <foo@bar>\"), discard full name. | |
6504 ADDRCELL is a cons cell where the car is the mail address and the | |
6505 cdr is the complete address (full name and mail address)." | |
6506 (if (string-match (concat (regexp-quote (car addrcell)) ".*" | |
6507 (regexp-quote (car addrcell))) | |
6508 (cdr addrcell)) | |
6509 (cons (car addrcell) (car addrcell)) | |
6510 addrcell)) | |
6511 | |
6512 (defcustom message-alter-recipients-function nil | |
6513 "Function called to allow alteration of reply header structures. | |
6514 It is called in `message-get-reply-headers' for each recipient. | |
6515 The function is called with one parameter, a cons cell ..." | |
6516 :type '(choice (const :tag "None" nil) | |
6517 (const :tag "Discard bogus full name" | |
6518 message-alter-recipients-discard-bogus-full-name) | |
6519 function) | |
6520 :version "23.1" ;; No Gnus | |
6521 :group 'message-headers) | |
6522 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6523 (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
|
6524 (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
|
6525 ;; 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
|
6526 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6527 (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
|
6528 ;; 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
|
6529 ;; 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
|
6530 (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
|
6531 (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
|
6532 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
|
6533 return t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6534 (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
|
6535 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
|
6536 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
|
6537 (mapconcat 'identity |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
6538 (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
|
6539 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
|
6540 ", ")) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6541 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
|
6542 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
|
6543 (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
|
6544 (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
|
6545 "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6546 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
|
6547 (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
|
6548 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6549 ;; 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
|
6550 (when mct |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6551 (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
|
6552 (equal (downcase mct) "nobody")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6553 (setq never-mct t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6554 (setq mct nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6555 ((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
|
6556 (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
|
6557 (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
|
6558 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6559 (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
|
6560 ;; 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
|
6561 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6562 ((not wide) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6563 (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
|
6564 (address-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6565 (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
|
6566 (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
|
6567 (when value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6568 (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
|
6569 ((and mft |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6570 (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
|
6571 (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
|
6572 (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
|
6573 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
|
6574 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
|
6575 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6576 " mft " |
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 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
|
6579 "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
|
6580 "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
|
6581 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6582 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
|
6583 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
|
6584 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
|
6585 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6586 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
|
6587 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
|
6588 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
|
6589 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
|
6590 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6591 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
|
6592 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
|
6593 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6594 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
|
6595 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
|
6596 (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
|
6597 (to-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6598 (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
|
6599 ;; 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
|
6600 (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
|
6601 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6602 (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
|
6603 (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
|
6604 (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
|
6605 (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
|
6606 (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
|
6607 (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
|
6608 ;; 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
|
6609 (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
|
6610 ;; Squeeze whitespace. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6611 (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
|
6612 (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
|
6613 ;; 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
|
6614 (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
|
6615 (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
|
6616 ;; 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
|
6617 (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
|
6618 (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
|
6619 ;; 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
|
6620 (setq recipients |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6621 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6622 (lambda (addr) |
93386 | 6623 (if message-alter-recipients-function |
6624 (funcall message-alter-recipients-function | |
6625 (cons (downcase (mail-strip-quoted-names addr)) | |
6626 addr)) | |
6627 (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
|
6628 (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
|
6629 ;; 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
|
6630 (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
|
6631 (while s |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6632 (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
|
6633 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6634 ;; 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
|
6635 ;; 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
|
6636 (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
|
6637 (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
|
6638 subaddrs recip) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6639 (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
|
6640 (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
|
6641 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
|
6642 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
|
6643 (when subaddrs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6644 (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
|
6645 (while subaddrs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6646 (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
|
6647 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
|
6648 (if recip |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6649 (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
|
6650 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6651 ;; 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
|
6652 ;; 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
|
6653 (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
|
6654 (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
|
6655 (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
|
6656 (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
|
6657 (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
|
6658 (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
|
6659 (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
|
6660 (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
|
6661 (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
|
6662 follow-to)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6663 |
74021 | 6664 (defcustom message-simplify-subject-functions |
6665 '(message-strip-list-identifiers | |
6666 message-strip-subject-re | |
6667 message-strip-subject-trailing-was | |
6668 message-strip-subject-encoded-words) | |
6669 "List of functions taking a string argument that simplify subjects. | |
6670 The functions are applied when replying to a message. | |
6671 | |
6672 Useful functions to put in this list include: | |
6673 `message-strip-list-identifiers', `message-strip-subject-re', | |
6674 `message-strip-subject-trailing-was', and | |
6675 `message-strip-subject-encoded-words'." | |
6676 :version "22.1" ;; Gnus 5.10.9 | |
6677 :group 'message-various | |
6678 :type '(repeat function)) | |
6679 | |
6680 (defun message-simplify-subject (subject &optional functions) | |
6681 "Return simplified SUBJECT." | |
6682 (unless functions | |
6683 ;; Simplify fully: | |
6684 (setq functions message-simplify-subject-functions)) | |
6685 (when (and (memq 'message-strip-list-identifiers functions) | |
6686 gnus-list-identifiers) | |
6687 (setq subject (message-strip-list-identifiers subject))) | |
6688 (when (memq 'message-strip-subject-re functions) | |
6689 (setq subject (concat "Re: " (message-strip-subject-re subject)))) | |
6690 (when (and (memq 'message-strip-subject-trailing-was functions) | |
6691 message-subject-trailing-was-query) | |
6692 (setq subject (message-strip-subject-trailing-was subject))) | |
6693 (when (memq 'message-strip-subject-encoded-words functions) | |
6694 (setq subject (message-strip-subject-encoded-words subject))) | |
6695 subject) | |
6696 | |
17493 | 6697 ;;;###autoload |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6698 (defun message-reply (&optional to-address wide) |
17493 | 6699 "Start editing a reply to the article in the current buffer." |
6700 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6701 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 6702 (let ((cur (current-buffer)) |
6703 from subject date reply-to to cc | |
6704 references message-id follow-to | |
6705 (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
|
6706 (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
|
6707 gnus-warning) |
17493 | 6708 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6709 (message-narrow-to-head-1) |
17493 | 6710 ;; Allow customizations to have their say. |
6711 (if (not wide) | |
6712 ;; 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
|
6713 (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
|
6714 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6715 (setq follow-to (funcall message-reply-to-function)))) |
17493 | 6716 ;; 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
|
6717 (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
|
6718 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6719 (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
|
6720 (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
|
6721 (setq message-id (message-fetch-field "message-id" t) |
17493 | 6722 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
|
6723 date (message-fetch-field "date") |
73007 | 6724 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
|
6725 subject (or (message-fetch-field "subject") "none")) |
74021 | 6726 |
6727 ;; Strip list identifiers, "Re: ", and "was:" | |
6728 (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
|
6729 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6730 (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
|
6731 (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
|
6732 (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
|
6733 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6734 (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
|
6735 (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
|
6736 |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6737 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6738 (message-pop-to-buffer |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6739 (message-buffer-name |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6740 (if wide "wide reply" "reply") from |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
6741 (if wide to-address nil)))) |
17493 | 6742 |
6743 (setq message-reply-headers | |
6744 (vector 0 subject from date message-id references 0 0 "")) | |
6745 | |
6746 (message-setup | |
6747 `((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
|
6748 ,@follow-to) |
17493 | 6749 cur))) |
6750 | |
6751 ;;;###autoload | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6752 (defun message-wide-reply (&optional to-address) |
17493 | 6753 "Make a \"wide\" reply to the message in the current buffer." |
6754 (interactive) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
6755 (message-reply to-address t)) |
17493 | 6756 |
6757 ;;;###autoload | |
6758 (defun message-followup (&optional to-newsgroups) | |
6759 "Follow up to the message in the current buffer. | |
6760 If TO-NEWSGROUPS, use that as the new Newsgroups line." | |
6761 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6762 (require 'gnus-sum) ; for gnus-list-identifiers |
17493 | 6763 (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
|
6764 from subject date reply-to mrt mct |
17493 | 6765 references message-id follow-to |
6766 (inhibit-point-motion-hooks t) | |
6767 (message-this-is-news t) | |
6768 followup-to distribution newsgroups gnus-warning posted-to) | |
6769 (save-restriction | |
6770 (narrow-to-region | |
6771 (goto-char (point-min)) | |
6772 (if (search-forward "\n\n" nil t) | |
6773 (1- (point)) | |
6774 (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
|
6775 (when (functionp message-followup-to-function) |
17493 | 6776 (setq follow-to |
6777 (funcall message-followup-to-function))) | |
6778 (setq from (message-fetch-field "from") | |
6779 date (message-fetch-field "date") | |
6780 subject (or (message-fetch-field "subject") "none") | |
6781 references (message-fetch-field "references") | |
6782 message-id (message-fetch-field "message-id" t) | |
6783 followup-to (message-fetch-field "followup-to") | |
6784 newsgroups (message-fetch-field "newsgroups") | |
6785 posted-to (message-fetch-field "posted-to") | |
6786 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
|
6787 mrt (message-fetch-field "mail-reply-to") |
17493 | 6788 distribution (message-fetch-field "distribution") |
6789 mct (message-fetch-field "mail-copies-to")) | |
6790 (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) | |
6791 (string-match "<[^>]+>" gnus-warning)) | |
6792 (setq message-id (match-string 0 gnus-warning))) | |
6793 ;; Remove bogus distribution. | |
6794 (when (and (stringp distribution) | |
6795 (let ((case-fold-search t)) | |
6796 (string-match "world" distribution))) | |
6797 (setq distribution nil)) | |
74021 | 6798 ;; Strip list identifiers, "Re: ", and "was:" |
6799 (setq subject (message-simplify-subject subject)) | |
17493 | 6800 (widen)) |
6801 | |
6802 (message-pop-to-buffer (message-buffer-name "followup" from newsgroups)) | |
6803 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6804 (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
|
6805 (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
|
6806 |
17493 | 6807 (message-setup |
6808 `((Subject . ,subject) | |
6809 ,@(cond | |
6810 (to-newsgroups | |
6811 (list (cons 'Newsgroups to-newsgroups))) | |
6812 (follow-to follow-to) | |
6813 ((and followup-to message-use-followup-to) | |
6814 (list | |
6815 (cond | |
6816 ((equal (downcase followup-to) "poster") | |
6817 (if (or (eq message-use-followup-to 'use) | |
6818 (message-y-or-n-p "Obey Followup-To: poster? " t "\ | |
6819 You should normally obey the Followup-To: header. | |
6820 | |
6821 `Followup-To: poster' sends your response via e-mail instead of news. | |
6822 | |
6823 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
|
6824 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
|
6825 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6826 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
|
6827 want to get rid of this query permanently.")) |
17493 | 6828 (progn |
6829 (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
|
6830 (cons 'To (or mrt reply-to from ""))) |
17493 | 6831 (cons 'Newsgroups newsgroups))) |
6832 (t | |
6833 (if (or (equal followup-to newsgroups) | |
6834 (not (eq message-use-followup-to 'ask)) | |
6835 (message-y-or-n-p | |
6836 (concat "Obey Followup-To: " followup-to "? ") t "\ | |
6837 You should normally obey the Followup-To: header. | |
6838 | |
6839 `Followup-To: " followup-to "' | |
6840 directs your response to " (if (string-match "," followup-to) | |
6841 "the specified newsgroups" | |
6842 "that newsgroup only") ". | |
6843 | |
6844 If a message is posted to several newsgroups, Followup-To is often | |
6845 used to direct the following discussion to one newsgroup only, | |
6846 because discussions that are spread over several newsgroup tend to | |
6847 be fragmented and very difficult to follow. | |
6848 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6849 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
|
6850 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
|
6851 |
3f394ef46f57
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6852 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
|
6853 want to get rid of this query permanently.")) |
17493 | 6854 (cons 'Newsgroups followup-to) |
6855 (cons 'Newsgroups newsgroups)))))) | |
6856 (posted-to | |
6857 `((Newsgroups . ,posted-to))) | |
6858 (t | |
6859 `((Newsgroups . ,newsgroups)))) | |
6860 ,@(and distribution (list (cons 'Distribution distribution))) | |
6861 ,@(when (and mct | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6862 (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
|
6863 (equal (downcase mct) "nobody")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6864 (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
|
6865 (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
|
6866 (or mrt reply-to from "") |
17493 | 6867 mct))))) |
6868 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6869 cur))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6870 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6871 (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
|
6872 "Non-nil means current article is yours. |
63398
2f37f6737221
(message-is-yours-p): Fix quoting.
Juanma Barranquero <lekktu@gmail.com>
parents:
62755
diff
changeset
|
6873 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
|
6874 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
|
6875 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
|
6876 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
|
6877 ;; 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
|
6878 ;; <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
|
6879 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6880 ;; 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
|
6881 ;; 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
|
6882 ;; issue cancel |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6883 ;; ELSE |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6884 ;; 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
|
6885 ;; ELSE |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6886 ;; 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
|
6887 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6888 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6889 (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
|
6890 (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
|
6891 (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
|
6892 t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6893 (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
|
6894 (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
|
6895 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6896 (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
|
6897 (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
|
6898 (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
|
6899 (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
|
6900 ;; 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
|
6901 (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
|
6902 (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
|
6903 (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
|
6904 (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
|
6905 (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
|
6906 ;; 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
|
6907 ;; '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
|
6908 (and from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6909 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
|
6910 (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6911 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
|
6912 (car (mail-header-parse-address from)))))))))) |
17493 | 6913 |
6914 ;;;###autoload | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6915 (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
|
6916 "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
|
6917 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
|
6918 (interactive "P") |
17493 | 6919 (unless (message-news-p) |
6920 (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
|
6921 (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
|
6922 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6923 ;; 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
|
6924 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6925 (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
|
6926 (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
|
6927 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
|
6928 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
|
6929 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
|
6930 ;; 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
|
6931 (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
|
6932 (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
|
6933 (when (yes-or-no-p "Do you really want to cancel this article? ") |
17493 | 6934 ;; Make control message. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6935 (if arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6936 (message-news) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6937 (setq buf (set-buffer (get-buffer-create " *message cancel*")))) |
17493 | 6938 (erase-buffer) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6939 (insert "Newsgroups: " newsgroups "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6940 "From: " from "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6941 "Subject: cmsg cancel " message-id "\n" |
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6942 "Control: cancel " message-id "\n" |
17493 | 6943 (if distribution |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6944 (concat "Distribution: " distribution "\n") |
17493 | 6945 "") |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
6946 mail-header-separator "\n" |
17493 | 6947 message-cancel-message) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6948 (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
|
6949 (unless arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6950 (message "Canceling your article...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
6951 (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
|
6952 '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
|
6953 (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
|
6954 (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
|
6955 (kill-buffer buf)))))) |
17493 | 6956 |
6957 ;;;###autoload | |
6958 (defun message-supersede () | |
6959 "Start composing a message to supersede the current message. | |
6960 This is done simply by taking the old article and adding a Supersedes | |
6961 header line with the old Message-ID." | |
6962 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
6963 (let ((cur (current-buffer))) |
17493 | 6964 ;; 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
|
6965 (unless (message-is-yours-p) |
17493 | 6966 (error "This article is not yours")) |
6967 ;; Get a normal message buffer. | |
6968 (message-pop-to-buffer (message-buffer-name "supersede")) | |
6969 (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
|
6970 (mime-to-mml) |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
6971 (message-narrow-to-head-1) |
17493 | 6972 ;; Remove unwanted headers. |
6973 (when message-ignored-supersedes-headers | |
6974 (message-remove-header message-ignored-supersedes-headers t)) | |
6975 (goto-char (point-min)) | |
6976 (if (not (re-search-forward "^Message-ID: " nil t)) | |
6977 (error "No Message-ID in this article") | |
6978 (replace-match "Supersedes: " t t)) | |
6979 (goto-char (point-max)) | |
6980 (insert mail-header-separator) | |
6981 (widen) | |
6982 (forward-line 1))) | |
6983 | |
6984 ;;;###autoload | |
6985 (defun message-recover () | |
6986 "Reread contents of current buffer from its last auto-save file." | |
6987 (interactive) | |
6988 (let ((file-name (make-auto-save-file-name))) | |
6989 (cond ((save-window-excursion | |
97142 | 6990 (with-output-to-temp-buffer "*Directory*" |
6991 (with-current-buffer standard-output | |
6992 (fundamental-mode)) ; for Emacs 20.4+ | |
6993 (buffer-disable-undo standard-output) | |
6994 (let ((default-directory "/")) | |
6995 (call-process | |
6996 "ls" nil standard-output nil "-l" file-name))) | |
17493 | 6997 (yes-or-no-p (format "Recover auto save file %s? " file-name))) |
6998 (let ((buffer-read-only nil)) | |
6999 (erase-buffer) | |
7000 (insert-file-contents file-name nil))) | |
7001 (t (error "message-recover cancelled"))))) | |
7002 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7003 ;;; Washing Subject: |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7004 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7005 (defun message-wash-subject (subject) |
35147 | 7006 "Remove junk like \"Re:\", \"(fwd)\", etc. added to subject string SUBJECT. |
7007 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
|
7008 (with-temp-buffer |
41494
933ab100fb4a
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36856
diff
changeset
|
7009 (insert subject) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7010 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7011 ;; 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
|
7012 (while (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7013 "\\([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
|
7014 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7015 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7016 ;; 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
|
7017 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7018 (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
|
7019 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7020 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7021 ;; and off the end |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7022 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7023 (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
|
7024 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7025 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7026 ;; 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
|
7027 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7028 (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
|
7029 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7030 (goto-char (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7031 (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
|
7032 (replace-match "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7033 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7034 (buffer-string))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7035 |
17493 | 7036 ;;; Forwarding messages. |
7037 | |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
7038 (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
|
7039 "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
|
7040 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7041 (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
|
7042 "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
|
7043 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
|
7044 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
|
7045 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
|
7046 (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
|
7047 (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
|
7048 (prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7049 (if group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7050 (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
|
7051 (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
|
7052 (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
|
7053 (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
|
7054 "(nowhere)")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7055 (concat "[" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7056 (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
|
7057 prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7058 (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
|
7059 "] " subject))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7060 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7061 (defun message-forward-subject-author-subject (subject) |
35147 | 7062 "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
|
7063 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
|
7064 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
|
7065 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
|
7066 (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
|
7067 (prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7068 (if group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7069 (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
|
7070 (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
|
7071 "(nowhere)")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7072 (concat "[" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7073 (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
|
7074 prefix |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7075 (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
|
7076 "] " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7077 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7078 (defun message-forward-subject-fwd (subject) |
35147 | 7079 "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
|
7080 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
|
7081 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
|
7082 (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
|
7083 subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7084 (concat "Fwd: " subject))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7085 |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
7086 (defun message-make-forward-subject () |
17493 | 7087 "Return a Subject header suitable for the message in the current buffer." |
7088 (save-excursion | |
7089 (save-restriction | |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
7090 (message-narrow-to-head-1) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7091 (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
|
7092 (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
|
7093 (setq subject |
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
7094 (if subject |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
7095 (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
|
7096 subject |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35453
diff
changeset
|
7097 (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
|
7098 "")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7099 (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
|
7100 (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
|
7101 ;; Make sure funcs is a list. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7102 (and funcs |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7103 (not (listp funcs)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7104 (setq funcs (list funcs))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7105 ;; 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
|
7106 ;; 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
|
7107 (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
|
7108 (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
|
7109 (setq subject (funcall func subject)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7110 subject)))) |
17493 | 7111 |
86154 | 7112 (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
|
7113 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7114 |
17493 | 7115 ;;;###autoload |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7116 (defun message-forward (&optional news digest) |
17493 | 7117 "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
|
7118 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
|
7119 Optional DIGEST will use digest to forward." |
17493 | 7120 (interactive "P") |
36856
e11fd97820c0
2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
36036
diff
changeset
|
7121 (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
|
7122 (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
|
7123 (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
|
7124 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
|
7125 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
|
7126 (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
|
7127 (if news |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7128 (message-news nil subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7129 (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
|
7130 (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
|
7131 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7132 (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
|
7133 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7134 "\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
|
7135 (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
|
7136 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7137 (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
|
7138 (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
|
7139 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7140 (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
|
7141 (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
|
7142 (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
|
7143 (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
|
7144 (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
|
7145 (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
|
7146 (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
|
7147 (buffer-string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7148 (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
|
7149 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7150 "\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
|
7151 (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
|
7152 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7153 (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
|
7154 (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
|
7155 (save-restriction |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7156 (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
|
7157 (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
|
7158 (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
|
7159 (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
|
7160 (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
|
7161 (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
|
7162 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
|
7163 (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
|
7164 (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
|
7165 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7166 (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
|
7167 (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
|
7168 (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
|
7169 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7170 (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
|
7171 (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
|
7172 (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
|
7173 (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
|
7174 (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
|
7175 (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
|
7176 (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
|
7177 ;; 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
|
7178 (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
|
7179 b (point) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7180 `(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
|
7181 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7182 (defun message-forward-make-body-mml (forward-buffer) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7183 (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
|
7184 (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
|
7185 (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
|
7186 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7187 (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
|
7188 (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
|
7189 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7190 (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
|
7191 (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
|
7192 (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
|
7193 (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
|
7194 (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
|
7195 (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
|
7196 (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
|
7197 (buffer-string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7198 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7199 (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
|
7200 (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
|
7201 (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
|
7202 (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
|
7203 (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
|
7204 (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
|
7205 (setq e (point)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7206 (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
|
7207 (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
|
7208 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
|
7209 (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
|
7210 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7211 (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
|
7212 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7213 "\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
|
7214 (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
|
7215 (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
|
7216 (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
|
7217 (insert |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7218 "\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
|
7219 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7220 (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
|
7221 (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
|
7222 (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
|
7223 (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
|
7224 (setq e (point)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7225 (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
|
7226 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7227 (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
|
7228 (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
|
7229 (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
|
7230 (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
|
7231 (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
|
7232 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7233 (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
|
7234 (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
|
7235 (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
|
7236 (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
|
7237 |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
7238 (autoload 'mm-uu-dissect-text-parts "mm-uu") |
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
95580
diff
changeset
|
7239 (autoload 'mm-uu-dissect "mm-uu") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7240 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7241 (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
|
7242 "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
|
7243 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
|
7244 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
|
7245 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
|
7246 (unless handles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7247 (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
|
7248 (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
|
7249 (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
|
7250 (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
|
7251 (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
|
7252 (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
|
7253 (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
|
7254 ;; 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
|
7255 ;; 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
|
7256 (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
|
7257 (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
|
7258 (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
|
7259 (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
|
7260 (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
|
7261 (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
|
7262 (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
|
7263 (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
|
7264 (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
|
7265 (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
|
7266 (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
|
7267 (progn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7268 (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
|
7269 (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
|
7270 (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
|
7271 (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
|
7272 (when handles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7273 (prog1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7274 (catch 'found |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7275 (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
|
7276 (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
|
7277 '("multipart/signed" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7278 "multipart/encrypted")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7279 (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
|
7280 (cdr handles)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7281 (list handles))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7282 (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
|
7283 (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
|
7284 (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
|
7285 (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
|
7286 (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
|
7287 "message/rfc822")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7288 (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
|
7289 (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
|
7290 (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
|
7291 (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
|
7292 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7293 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7294 (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
|
7295 ;; 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
|
7296 ;; message. |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7297 (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
|
7298 (message-goto-body) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7299 (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
|
7300 (if digest |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7301 (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
|
7302 (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
|
7303 (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
|
7304 (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
|
7305 ;; 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
|
7306 ;; 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
|
7307 ;; 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
|
7308 (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
|
7309 (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
|
7310 (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
|
7311 (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
|
7312 (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
|
7313 (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
|
7314 (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
|
7315 (message-position-point)) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7316 |
101896
97a01032d9d2
(rmail-msg-restore-non-pruned-header): Remove unneeded autoload of
Glenn Morris <rgm@gnu.org>
parents:
100993
diff
changeset
|
7317 (declare-function rmail-toggle-header "rmail" (&optional arg)) |
97a01032d9d2
(rmail-msg-restore-non-pruned-header): Remove unneeded autoload of
Glenn Morris <rgm@gnu.org>
parents:
100993
diff
changeset
|
7318 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7319 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7320 (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
|
7321 (save-window-excursion |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7322 (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
|
7323 (if (rmail-msg-is-pruned) |
101896
97a01032d9d2
(rmail-msg-restore-non-pruned-header): Remove unneeded autoload of
Glenn Morris <rgm@gnu.org>
parents:
100993
diff
changeset
|
7324 (if (fboundp 'rmail-msg-restore-non-pruned-header) |
97a01032d9d2
(rmail-msg-restore-non-pruned-header): Remove unneeded autoload of
Glenn Morris <rgm@gnu.org>
parents:
100993
diff
changeset
|
7325 (rmail-msg-restore-non-pruned-header) ; Emacs 22 |
97a01032d9d2
(rmail-msg-restore-non-pruned-header): Remove unneeded autoload of
Glenn Morris <rgm@gnu.org>
parents:
100993
diff
changeset
|
7326 (rmail-toggle-header 0)))) ; Emacs 23 |
41511
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7327 (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
|
7328 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7329 ;; 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
|
7330 ;;;###autoload |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7331 (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
|
7332 "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
|
7333 (interactive) |
19496cafe865
2001-11-25 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41494
diff
changeset
|
7334 (setq rmail-enable-mime-composing t) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49034
diff
changeset
|
7335 (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
|
7336 'message-forward-rmail-make-body)) |
17493 | 7337 |
7338 ;;;###autoload | |
7339 (defun message-resend (address) | |
7340 "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
|
7341 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7342 (list (message-read-from-minibuffer "Resend message to: "))) |
17493 | 7343 (message "Resending message to %s..." address) |
7344 (save-excursion | |
7345 (let ((cur (current-buffer)) | |
7346 beg) | |
7347 ;; 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
|
7348 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7349 (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
|
7350 (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
|
7351 (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
|
7352 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
|
7353 message-setup-hook) |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7354 (message-setup `((To . ,address)))) |
17493 | 7355 ;; 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
|
7356 (message-generate-headers '(From Date To Message-ID)) |
17493 | 7357 (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
|
7358 ;; 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
|
7359 (message-remove-header message-ignored-mail-headers t) |
17493 | 7360 ;; 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
|
7361 (goto-char (point-min)) |
17493 | 7362 (while (re-search-forward "^[A-Za-z]" nil t) |
7363 (forward-char -1) | |
7364 (insert "Resent-")) | |
7365 (widen) | |
7366 (forward-line) | |
7367 (delete-region (point) (point-max)) | |
7368 (setq beg (point)) | |
7369 ;; Insert the message to be resent. | |
7370 (insert-buffer-substring cur) | |
7371 (goto-char (point-min)) | |
7372 (search-forward "\n\n") | |
7373 (forward-char -1) | |
7374 (save-restriction | |
7375 (narrow-to-region beg (point)) | |
7376 (message-remove-header message-ignored-resent-headers t) | |
7377 (goto-char (point-max))) | |
7378 (insert mail-header-separator) | |
7379 ;; 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
|
7380 (while (re-search-backward "^\\(Also-\\)*Resent-" beg t) |
17493 | 7381 (beginning-of-line) |
7382 (insert "Also-")) | |
7383 ;; Quote any "From " lines at the beginning. | |
7384 (goto-char beg) | |
7385 (when (looking-at "From ") | |
7386 (replace-match "X-From-Line: ")) | |
7387 ;; Send it. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7388 (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
|
7389 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
|
7390 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
|
7391 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
|
7392 (message-send-mail)) |
17493 | 7393 (kill-buffer (current-buffer))) |
7394 (message "Resending message to %s...done" address))) | |
7395 | |
7396 ;;;###autoload | |
7397 (defun message-bounce () | |
7398 "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
|
7399 This only makes sense if the current message is a bounce message that |
17493 | 7400 contains some mail you have written which has been bounced back to |
7401 you." | |
7402 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7403 (let ((handles (mm-dissect-buffer t)) |
17493 | 7404 boundary) |
7405 (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
|
7406 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7407 ;; 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
|
7408 (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
|
7409 ;; 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
|
7410 ;; manually. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7411 (mm-insert-part handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7412 (undo-boundary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7413 (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
|
7414 (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
|
7415 (setq boundary (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7416 ;; 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
|
7417 (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
|
7418 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7419 (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
|
7420 (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
|
7421 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7422 (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
|
7423 (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
|
7424 (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
|
7425 (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
|
7426 (point)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7427 (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
|
7428 (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
|
7429 (delete-region (match-beginning 0) (match-end 0))))) |
78369 | 7430 (mime-to-mml) |
17493 | 7431 (save-restriction |
34752
f04f551e94ce
* message.el (message-narrow-to-head-1): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34485
diff
changeset
|
7432 (message-narrow-to-head-1) |
17493 | 7433 (message-remove-header message-ignored-bounced-headers t) |
7434 (goto-char (point-max)) | |
7435 (insert mail-header-separator)) | |
7436 (message-position-point))) | |
7437 | |
7438 ;;; | |
7439 ;;; Interactive entry points for new message buffers. | |
7440 ;;; | |
7441 | |
7442 ;;;###autoload | |
7443 (defun message-mail-other-window (&optional to subject) | |
7444 "Like `message-mail' command, but display mail buffer in another window." | |
7445 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7446 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7447 (let ((pop-up-windows t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7448 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7449 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7450 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7451 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7452 (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
|
7453 (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
|
7454 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
76650 | 7455 nil nil nil 'switch-to-buffer-other-window))) |
17493 | 7456 |
7457 ;;;###autoload | |
7458 (defun message-mail-other-frame (&optional to subject) | |
7459 "Like `message-mail' command, but display mail buffer in another frame." | |
7460 (interactive) | |
34797
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7461 (unless (message-mail-user-agent) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7462 (let ((pop-up-frames t) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7463 (special-display-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7464 (special-display-regexps nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7465 (same-window-buffer-names nil) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7466 (same-window-regexps nil)) |
b473bc6d9a55
* mml.el (gnus-add-minor-mode): Autoload.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34766
diff
changeset
|
7467 (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
|
7468 (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
|
7469 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) |
76650 | 7470 nil nil nil 'switch-to-buffer-other-frame))) |
17493 | 7471 |
7472 ;;;###autoload | |
7473 (defun message-news-other-window (&optional newsgroups subject) | |
7474 "Start editing a news article to be sent." | |
7475 (interactive) | |
7476 (let ((pop-up-windows t) | |
7477 (special-display-buffer-names nil) | |
7478 (special-display-regexps nil) | |
7479 (same-window-buffer-names nil) | |
7480 (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
|
7481 (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
|
7482 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7483 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7484 (Subject . ,(or subject "")))))) |
17493 | 7485 |
7486 ;;;###autoload | |
7487 (defun message-news-other-frame (&optional newsgroups subject) | |
7488 "Start editing a news article to be sent." | |
7489 (interactive) | |
7490 (let ((pop-up-frames t) | |
7491 (special-display-buffer-names nil) | |
7492 (special-display-regexps nil) | |
7493 (same-window-buffer-names nil) | |
7494 (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
|
7495 (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
|
7496 (let ((message-this-is-news t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7497 (message-setup `((Newsgroups . ,(or newsgroups "")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7498 (Subject . ,(or subject "")))))) |
17493 | 7499 |
7500 ;;; underline.el | |
7501 | |
7502 ;; This code should be moved to underline.el (from which it is stolen). | |
7503 | |
7504 ;;;###autoload | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7505 (defun message-bold-region (start end) |
17493 | 7506 "Bold all nonblank characters in the region. |
7507 Works by overstriking characters. | |
7508 Called from program, takes two arguments START and END | |
7509 which specify the range to operate on." | |
7510 (interactive "r") | |
7511 (save-excursion | |
7512 (let ((end1 (make-marker))) | |
7513 (move-marker end1 (max start end)) | |
7514 (goto-char (min start end)) | |
7515 (while (< (point) end1) | |
7516 (or (looking-at "[_\^@- ]") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7517 (insert (char-after) "\b")) |
17493 | 7518 (forward-char 1))))) |
7519 | |
7520 ;;;###autoload | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7521 (defun message-unbold-region (start end) |
17493 | 7522 "Remove all boldness (overstruck characters) in the region. |
7523 Called from program, takes two arguments START and END | |
7524 which specify the range to operate on." | |
7525 (interactive "r") | |
7526 (save-excursion | |
7527 (let ((end1 (make-marker))) | |
7528 (move-marker end1 (max start end)) | |
7529 (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
|
7530 (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
|
7531 (if (eq (char-after) (char-after (- (point) 2))) |
17493 | 7532 (delete-char -2)))))) |
7533 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7534 (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
|
7535 "Exchange point and mark, but don't activate region if it was inactive." |
106715
428005d3198e
Fix last change to message-exchange-point-and-mark.
Chong Yidong <cyd@stupidchicken.com>
parents:
106693
diff
changeset
|
7536 (goto-char (prog1 (mark t) |
428005d3198e
Fix last change to message-exchange-point-and-mark.
Chong Yidong <cyd@stupidchicken.com>
parents:
106693
diff
changeset
|
7537 (set-marker (mark-marker) (point))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7538 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7539 (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
|
7540 (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
|
7541 (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
|
7542 (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
|
7543 (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
|
7544 (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
|
7545 (mapcar #'delete-overlay (overlays-in (point-min) (point-max))))) |
17493 | 7546 |
7547 ;; Support for toolbar | |
86154 | 7548 (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
|
7549 |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7550 ;; 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
|
7551 ;; 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
|
7552 ;; 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
|
7553 (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
|
7554 "Update message mode toolbar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7555 Setter function for custom variables." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7556 (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
|
7557 (when symbol |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7558 ;; When used as ":set" function: |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7559 (set-default symbol value))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7560 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7561 (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
|
7562 'message-tool-bar-gnome |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7563 'message-tool-bar-retro) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7564 "Specifies the message mode tool bar. |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7565 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7566 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
|
7567 `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
|
7568 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
|
7569 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7570 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
|
7571 `message-tool-bar-retro'." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7572 :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
|
7573 :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
|
7574 (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
|
7575 (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
|
7576 (symbol)) |
92336
5f827896103e
Change defcustom :version from 23.0 to 23.1.
Glenn Morris <rgm@gnu.org>
parents:
92147
diff
changeset
|
7577 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7578 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7579 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7580 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7581 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7582 (defcustom message-tool-bar-gnome |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7583 '((ispell-message "spell" nil |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7584 :visible (or (not (boundp 'flyspell-mode)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7585 (not flyspell-mode))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7586 (flyspell-buffer "spell" t |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7587 :visible (and (boundp 'flyspell-mode) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7588 flyspell-mode) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7589 :help "Flyspell whole buffer") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7590 (gmm-ignore "separator") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7591 (message-send-and-exit "mail/send") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7592 (message-dont-send "mail/save-draft") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7593 (message-kill-buffer "close") ;; stock_cancel |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7594 (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
|
7595 (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
|
7596 (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
|
7597 (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
|
7598 (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
|
7599 (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
|
7600 (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
|
7601 (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
|
7602 "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
|
7603 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7604 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
|
7605 :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
|
7606 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7607 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7608 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7609 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7610 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7611 (defcustom message-tool-bar-retro |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7612 '(;; 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
|
7613 (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
|
7614 (message-kill-buffer "close") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7615 (message-dont-send "cancel") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7616 (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
|
7617 (ispell-message "spell") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7618 (mml-preview "preview" mml-mode-map) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7619 (message-insert-importance-high "gnus/important") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7620 (message-insert-importance-low "gnus/unimportant") |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7621 (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
|
7622 "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
|
7623 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7624 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
|
7625 :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
|
7626 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7627 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7628 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7629 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7630 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7631 (defcustom message-tool-bar-zap-list |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7632 '(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
|
7633 print-buffer customize help) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7634 "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
|
7635 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
|
7636 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7637 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
|
7638 :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
|
7639 :version "23.1" ;; No Gnus |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7640 :initialize 'custom-initialize-default |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7641 :set 'message-tool-bar-update |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7642 :group 'message) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7643 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7644 (defvar image-load-path) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7645 |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7646 (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
|
7647 "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
|
7648 When FORCE, rebuild the tool bar." |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7649 (when (and (not (featurep 'xemacs)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7650 (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
|
7651 tool-bar-mode |
70051
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7652 (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
|
7653 (setq message-tool-bar-map |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7654 (let* ((load-path |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7655 (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
|
7656 "mail/save-draft.xpm" |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7657 nil t)) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7658 (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
|
7659 (when (boundp 'image-load-path) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7660 image-load-path)))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7661 (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
|
7662 message-tool-bar-zap-list |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7663 'message-mode-map)))) |
700b1f9b81e2
[ Merge Gnome tool bars from Gnus trunk ]
Reiner Steib <Reiner.Steib@gmx.de>
parents:
69944
diff
changeset
|
7664 message-tool-bar-map) |
17493 | 7665 |
7666 ;;; Group name completion. | |
7667 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7668 (defcustom message-newgroups-header-regexp |
17493 | 7669 "^\\(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
|
7670 "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
|
7671 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7672 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7673 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7674 (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
|
7675 (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
|
7676 '("^\\(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
|
7677 '("^\\(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
|
7678 . 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
|
7679 '("^\\(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
|
7680 . 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
|
7681 "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
|
7682 :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
|
7683 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7684 :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
|
7685 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7686 (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
|
7687 (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
|
7688 "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
|
7689 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
|
7690 :group 'message |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7691 :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
|
7692 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7693 (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
|
7694 "*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
|
7695 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
|
7696 :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
|
7697 :group 'message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7698 :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
|
7699 :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
|
7700 function)) |
17493 | 7701 |
87191
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
7702 (declare-function mail-abbrev-in-expansion-header-p "mailabbrev" ()) |
066a2efbc9c8
(declare-function): Add compatibility declaration.
Glenn Morris <rgm@gnu.org>
parents:
87097
diff
changeset
|
7703 |
17493 | 7704 (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
|
7705 "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
|
7706 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
|
7707 those headers." |
17493 | 7708 (interactive) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7709 (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
|
7710 (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
|
7711 (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
|
7712 (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
|
7713 (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
|
7714 (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
|
7715 (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
|
7716 (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
|
7717 'indent-relative)))) |
17493 | 7718 |
66573
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
7719 (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
|
7720 (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
|
7721 (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
|
7722 (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
|
7723 (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
|
7724 (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
|
7725 (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
|
7726 (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
|
7727 "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
|
7728 (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
|
7729 |
17493 | 7730 (defun message-expand-group () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7731 "Expand the group name under point." |
17493 | 7732 (let* ((b (save-excursion |
7733 (save-restriction | |
7734 (narrow-to-region | |
7735 (save-excursion | |
7736 (beginning-of-line) | |
7737 (skip-chars-forward "^:") | |
7738 (1+ (point))) | |
7739 (point)) | |
7740 (skip-chars-backward "^, \t\n") (point)))) | |
7741 (completion-ignore-case t) | |
106372
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7742 (e (progn (skip-chars-forward "^,\t\n ") (point))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7743 (hashtb (and (boundp 'gnus-active-hashtb) gnus-active-hashtb))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7744 (message-completion-in-region e b hashtb))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7745 |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7746 (defalias 'message-completion-in-region |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7747 (if (fboundp 'completion-in-region) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7748 'completion-in-region |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7749 (lambda (e b hashtb) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7750 (let* ((string (buffer-substring b e)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7751 (completions (all-completions string hashtb)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7752 comp) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7753 (delete-region b (point)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7754 (cond |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7755 ((= (length completions) 1) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7756 (if (string= (car completions) string) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7757 (progn |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7758 (insert string) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7759 (message "Only matching group")) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7760 (insert (car completions)))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7761 ((and (setq comp (try-completion string hashtb)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7762 (not (string= comp string))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7763 (insert comp)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7764 (t |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7765 (insert string) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7766 (if (not comp) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7767 (message "No matching groups") |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7768 (save-selected-window |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7769 (pop-to-buffer "*Completions*") |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7770 (buffer-disable-undo) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7771 (let ((buffer-read-only nil)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7772 (erase-buffer) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7773 (let ((standard-output (current-buffer))) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7774 (message-display-completion-list (sort completions 'string<) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7775 string)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7776 (setq buffer-read-only nil) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7777 (goto-char (point-min)) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7778 (delete-region (point) |
9baad4abae40
(message-completion-in-region): New compatibility function.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106358
diff
changeset
|
7779 (progn (forward-line 3) (point)))))))))))) |
17493 | 7780 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7781 (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
|
7782 (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
|
7783 (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
|
7784 eudc-protocol) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7785 (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
|
7786 ((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
|
7787 (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
|
7788 (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
|
7789 (t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7790 (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
|
7791 |
17493 | 7792 ;;; Help stuff. |
7793 | |
7794 (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
|
7795 "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
|
7796 If SHOW is non-nil, the arguments TEXT... are displayed in a temp buffer. |
17493 | 7797 The following arguments may contain lists of values." |
7798 (if (and show | |
7799 (setq text (message-flatten-list text))) | |
7800 (save-window-excursion | |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7801 (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
|
7802 (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
|
7803 (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
|
7804 (mapc 'princ text) |
17493 | 7805 (goto-char (point-min)))) |
7806 (funcall ask question)) | |
7807 (funcall ask question))) | |
7808 | |
7809 (defun message-flatten-list (list) | |
7810 "Return a new, flat list that contains all elements of LIST. | |
7811 | |
7812 \(message-flatten-list '(1 (2 3 (4 5 (6))) 7)) | |
7813 => (1 2 3 4 5 6 7)" | |
7814 (cond ((consp list) | |
7815 (apply 'append (mapcar 'message-flatten-list list))) | |
7816 (list | |
7817 (list list)))) | |
7818 | |
7819 (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
|
7820 "Create and return a buffer with name based on NAME using `generate-new-buffer'. |
17493 | 7821 Then clone the local variables and values from the old buffer to the |
7822 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
|
7823 regexp VARSTR." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7824 (let ((oldbuf (current-buffer))) |
86339
6f4793ab0756
(message-send-mail-function): Fix error convention.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
86276
diff
changeset
|
7825 (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
|
7826 (message-clone-locals oldbuf varstr) |
17493 | 7827 (current-buffer)))) |
7828 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7829 (defun message-clone-locals (buffer &optional varstr) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7830 "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
|
7831 (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
|
7832 (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address")) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7833 (mapcar |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7834 (lambda (local) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7835 (when (and (consp local) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
7836 (car local) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7837 (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
|
7838 (or (null varstr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7839 (string-match varstr (symbol-name (car local))))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7840 (ignore-errors |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7841 (set (make-local-variable (car local)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7842 (cdr local))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7843 locals))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19762
diff
changeset
|
7844 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7845 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7846 ;;; MIME functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7847 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7848 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7849 (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
|
7850 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7851 (defun message-encode-message-body () |
35147 | 7852 (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
|
7853 (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
|
7854 message-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7855 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7856 lines content-type-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7857 (message-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7858 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7859 (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
|
7860 (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
|
7861 (when new |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7862 (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
|
7863 (insert new) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7864 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7865 (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
|
7866 (delete-char 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7867 (search-forward "\n\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7868 (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
|
7869 (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
|
7870 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7871 (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
|
7872 (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
|
7873 (goto-char (point-max)) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7874 (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
|
7875 (when lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7876 (insert lines)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7877 (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
|
7878 (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
|
7879 (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
|
7880 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7881 (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
|
7882 (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
|
7883 (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
|
7884 ;; 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
|
7885 ;; 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
|
7886 ;; 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
|
7887 ;; 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
|
7888 ;; 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
|
7889 (unless content-type-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
7890 (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
|
7891 ;; 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
|
7892 (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
|
7893 (forward-line 1) |
67030
572ca24101c2
message.el: Revert last changes.
Chong Yidong <cyd@stupidchicken.com>
parents:
66966
diff
changeset
|
7894 (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
|
7895 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7896 (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
|
7897 "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
|
7898 (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
|
7899 (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
|
7900 (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
|
7901 (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
|
7902 (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
|
7903 (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
|
7904 (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
|
7905 (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
|
7906 |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7907 (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
|
7908 "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
|
7909 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
|
7910 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
|
7911 (require 'mail-utils) |
79313 | 7912 (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
|
7913 (emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7914 (split-string |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7915 (mail-strip-quoted-names |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7916 (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
|
7917 "[ \f\t\n\r\v,]+")) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7918 email) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7919 (while emails |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7920 (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
|
7921 (setq email (car emails) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7922 emails nil)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7923 (pop emails)) |
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7924 (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
|
7925 (message-remove-header "From") |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7926 (goto-char (point-max)) |
79313 | 7927 (insert "From: " (let ((user-mail-address email)) (message-make-from)) |
7928 "\n")))) | |
32967
7625203dacf3
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
32964
diff
changeset
|
7929 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7930 (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
|
7931 (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
|
7932 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7933 (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
|
7934 (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
|
7935 (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
|
7936 (if value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7937 (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
|
7938 (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
|
7939 (and value |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7940 (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
|
7941 value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7942 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7943 (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
|
7944 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7945 (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
|
7946 (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
|
7947 (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
|
7948 (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
|
7949 (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
|
7950 (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
|
7951 (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
|
7952 (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
|
7953 (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
|
7954 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7955 (or to "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7956 (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
|
7957 (or cc "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7958 (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
|
7959 (or bcc ""))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7960 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7961 (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
|
7962 "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
|
7963 (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
|
7964 (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
|
7965 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
|
7966 (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
|
7967 (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
|
7968 (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
|
7969 (when regexps |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7970 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7971 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7972 (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
|
7973 (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
|
7974 (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
|
7975 (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
|
7976 (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
|
7977 (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
|
7978 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
|
7979 (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
|
7980 (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
|
7981 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
|
7982 (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
|
7983 (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
|
7984 (insert header) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
7985 (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
|
7986 (+ 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
|
7987 (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
|
7988 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7989 (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
|
7990 (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
|
7991 (reverse nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7992 (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
|
7993 (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
|
7994 (pop regexps)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7995 (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
|
7996 (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
|
7997 (if reverse |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7998 (not result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
7999 result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8000 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8001 (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
|
8002 (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
|
8003 (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
|
8004 (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
|
8005 (setq string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8006 (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
|
8007 (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
|
8008 (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
|
8009 string)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8010 (ecomplete-save)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8011 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8012 (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
|
8013 "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
|
8014 (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
|
8015 (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
|
8016 (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
|
8017 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8018 (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
|
8019 (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
|
8020 (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
|
8021 (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
|
8022 (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
|
8023 (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
|
8024 (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
|
8025 (1+ (point))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8026 (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
|
8027 (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
|
8028 (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
|
8029 (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
|
8030 (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
|
8031 (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
|
8032 (insert match))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
82221
diff
changeset
|
8033 |
92694 | 8034 ;; To send pre-formatted letters like the example below, you can use |
8035 ;; `message-send-form-letter': | |
8036 ;; --8<---------------cut here---------------start------------->8--- | |
8037 ;; To: alice@invalid.invalid | |
8038 ;; Subject: Verification of your contact information | |
8039 ;; From: Contact verification <admin@foo.invalid> | |
8040 ;; --text follows this line-- | |
8041 ;; Hi Alice, | |
8042 ;; please verify that your contact information is still valid: | |
8043 ;; Alice A, A avenue 11, 1111 A town, Austria | |
8044 ;; ----------next form letter message follows this line---------- | |
8045 ;; To: bob@invalid.invalid | |
8046 ;; Subject: Verification of your contact information | |
8047 ;; From: Contact verification <admin@foo.invalid> | |
8048 ;; --text follows this line-- | |
8049 ;; Hi Bob, | |
8050 ;; please verify that your contact information is still valid: | |
8051 ;; Bob, B street 22, 22222 Be town, Belgium | |
8052 ;; ----------next form letter message follows this line---------- | |
8053 ;; To: charlie@invalid.invalid | |
8054 ;; Subject: Verification of your contact information | |
8055 ;; From: Contact verification <admin@foo.invalid> | |
8056 ;; --text follows this line-- | |
8057 ;; Hi Charlie, | |
8058 ;; please verify that your contact information is still valid: | |
8059 ;; Charlie Chaplin, C plaza 33, 33333 C town, Chile | |
8060 ;; --8<---------------cut here---------------end--------------->8--- | |
8061 | |
8062 ;; FIXME: What is the most common term (circular letter, form letter, serial | |
8063 ;; letter, standard letter) for such kind of letter? See also | |
8064 ;; <http://en.wikipedia.org/wiki/Form_letter> | |
8065 | |
8066 ;; FIXME: Maybe extent message-mode's font-lock support to recognize | |
8067 ;; `message-form-letter-separator', i.e. highlight each message like a single | |
8068 ;; message. | |
8069 | |
8070 (defcustom message-form-letter-separator | |
8071 "\n----------next form letter message follows this line----------\n" | |
8072 "Separator for `message-send-form-letter'." | |
8073 ;; :group 'message-form-letter | |
8074 :group 'message-various | |
8075 :version "23.1" ;; No Gnus | |
8076 :type 'string) | |
8077 | |
8078 (defcustom message-send-form-letter-delay 1 | |
8079 "Delay in seconds when sending a message with `message-send-form-letter'. | |
8080 Only used when `message-send-form-letter' is called with non-nil | |
8081 argument `force'." | |
8082 ;; :group 'message-form-letter | |
8083 :group 'message-various | |
8084 :version "23.1" ;; No Gnus | |
8085 :type 'integer) | |
8086 | |
8087 (defun message-send-form-letter (&optional force) | |
8088 "Sent all form letter messages from current buffer. | |
8089 Unless FORCE, prompt before sending. | |
8090 | |
8091 The messages are separated by `message-form-letter-separator'. | |
8092 Header and body are separated by `mail-header-separator'." | |
8093 (interactive "P") | |
8094 (let ((sent 0) (skipped 0) | |
8095 start end text | |
8096 buff | |
8097 to done) | |
8098 (goto-char (point-min)) | |
8099 (while (not done) | |
8100 (setq start (point) | |
8101 end (if (search-forward message-form-letter-separator nil t) | |
8102 (- (point) (length message-form-letter-separator) -1) | |
8103 (setq done t) | |
8104 (point-max))) | |
8105 (setq text | |
8106 (buffer-substring-no-properties start end)) | |
8107 (setq buff (generate-new-buffer "*mail - form letter*")) | |
8108 (with-current-buffer buff | |
8109 (insert text) | |
8110 (message-mode) | |
8111 (setq to (message-fetch-field "To")) | |
8112 (switch-to-buffer buff) | |
8113 (when force | |
8114 (sit-for message-send-form-letter-delay)) | |
8115 (if (or force | |
8116 (y-or-n-p (format "Send message to `%s'? " to))) | |
8117 (progn | |
8118 (setq sent (1+ sent)) | |
8119 (message-send-and-exit)) | |
8120 (message (format "Message to `%s' skipped." to)) | |
8121 (setq skipped (1+ skipped))) | |
8122 (when (buffer-live-p buff) | |
8123 (kill-buffer buff)))) | |
8124 (message "%s message(s) sent, %s skipped." sent skipped))) | |
8125 | |
93386 | 8126 (defun message-replace-header (header new-value &optional after force) |
8127 "Remove HEADER and insert the NEW-VALUE. | |
8128 If AFTER, insert after this header. If FORCE, insert new field | |
8129 even if NEW-VALUE is empty." | |
8130 ;; Similar to `nnheader-replace-header' but for message buffers. | |
8131 (save-excursion | |
8132 (save-restriction | |
8133 (message-narrow-to-headers) | |
8134 (message-remove-header header)) | |
8135 (when (or force (> (length new-value) 0)) | |
8136 (if after | |
8137 (message-position-on-field header after) | |
8138 (message-position-on-field header)) | |
8139 (insert new-value)))) | |
8140 | |
8141 (defcustom message-recipients-without-full-name | |
8142 (list "ding@gnus.org" | |
8143 "bugs@gnus.org" | |
8144 "emacs-devel@gnu.org" | |
8145 "emacs-pretest-bug@gnu.org" | |
8146 "bug-gnu-emacs@gnu.org") | |
8147 "Mail addresses that have no full name. | |
8148 Used in `message-simplify-recipients'." | |
8149 ;; Maybe the addresses could be extracted from | |
8150 ;; `gnus-parameter-to-list-alist'? | |
8151 :type '(choice (const :tag "None" nil) | |
8152 (repeat string)) | |
8153 :version "23.1" ;; No Gnus | |
8154 :group 'message-headers) | |
8155 | |
8156 (defun message-simplify-recipients () | |
8157 (interactive) | |
8158 (dolist (hdr '("Cc" "To")) | |
8159 (message-replace-header | |
8160 hdr | |
8161 (mapconcat | |
8162 (lambda (addrcomp) | |
8163 (if (and message-recipients-without-full-name | |
8164 (string-match | |
8165 (regexp-opt message-recipients-without-full-name) | |
8166 (cadr addrcomp))) | |
8167 (cadr addrcomp) | |
8168 (if (car addrcomp) | |
8169 (message-make-from (car addrcomp) (cadr addrcomp)) | |
8170 (cadr addrcomp)))) | |
8171 (when (message-fetch-field hdr) | |
8172 (mail-extract-address-components | |
8173 (message-fetch-field hdr) t)) | |
8174 ", ")))) | |
8175 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8176 (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
|
8177 (require 'messagexmas) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54287
diff
changeset
|
8178 (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
|
8179 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8180 (provide 'message) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23743
diff
changeset
|
8181 |
17493 | 8182 (run-hooks 'message-load-hook) |
8183 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8184 ;; Local Variables: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8185 ;; coding: iso-8859-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
8186 ;; End: |
17493 | 8187 |
59756
b53453586872
(message-beginning-of-line): Change the behavior when
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
8188 ;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 |
17493 | 8189 ;;; message.el ends here |