Mercurial > emacs
annotate lisp/gnus/gnus-art.el @ 45775:25c330bebee4
(Info-select-node): Turn header line on or off here.
(Info-setup-header-line): Function deleted.
(Info-mode): Make Info-header-line local.
(Info-fontify-node): Ignore Info-use-header-line.
Unconditionally compute what the header line should be, and
store it on the `header-line' property of the node's first char.
Bind [header-line down-mouse-1].
Use `keymap' property, not `local-map'.
Bind [mouse-2] for mouse clicks on the node line in the text.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 12 Jun 2002 12:20:17 +0000 |
parents | da1c26da109e |
children | 3b7e1c7a2739 |
rev | line source |
---|---|
17493 | 1 ;;; gnus-art.el --- article mode commands for Gnus |
39335
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
2 |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
39335
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
25 | |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
19521
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
30 (eval-when-compile (require 'cl)) |
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
31 |
17493 | 32 (require 'gnus) |
33 (require 'gnus-sum) | |
34 (require 'gnus-spec) | |
35 (require 'gnus-int) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
36 (require 'mm-bodies) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
37 (require 'mail-parse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
38 (require 'mm-decode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
39 (require 'mm-view) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
40 (require 'wid-edit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
41 (require 'mm-uu) |
17493 | 42 |
43 (defgroup gnus-article nil | |
44 "Article display." | |
45 :link '(custom-manual "(gnus)The Article Buffer") | |
46 :group 'gnus) | |
47 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
48 (defgroup gnus-article-treat nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
49 "Treating article parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
50 :link '(custom-manual "(gnus)Article Hiding") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
51 :group 'gnus-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
52 |
17493 | 53 (defgroup gnus-article-hiding nil |
54 "Hiding article parts." | |
55 :link '(custom-manual "(gnus)Article Hiding") | |
56 :group 'gnus-article) | |
57 | |
58 (defgroup gnus-article-highlight nil | |
59 "Article highlighting." | |
60 :link '(custom-manual "(gnus)Article Highlighting") | |
61 :group 'gnus-article | |
62 :group 'gnus-visual) | |
63 | |
64 (defgroup gnus-article-signature nil | |
65 "Article signatures." | |
66 :link '(custom-manual "(gnus)Article Signature") | |
67 :group 'gnus-article) | |
68 | |
69 (defgroup gnus-article-headers nil | |
70 "Article headers." | |
71 :link '(custom-manual "(gnus)Hiding Headers") | |
72 :group 'gnus-article) | |
73 | |
74 (defgroup gnus-article-washing nil | |
75 "Special commands on articles." | |
76 :link '(custom-manual "(gnus)Article Washing") | |
77 :group 'gnus-article) | |
78 | |
79 (defgroup gnus-article-emphasis nil | |
80 "Fontisizing articles." | |
81 :link '(custom-manual "(gnus)Article Fontisizing") | |
82 :group 'gnus-article) | |
83 | |
84 (defgroup gnus-article-saving nil | |
85 "Saving articles." | |
86 :link '(custom-manual "(gnus)Saving Articles") | |
87 :group 'gnus-article) | |
88 | |
89 (defgroup gnus-article-mime nil | |
90 "Worshiping the MIME wonder." | |
91 :link '(custom-manual "(gnus)Using MIME") | |
92 :group 'gnus-article) | |
93 | |
94 (defgroup gnus-article-buttons nil | |
95 "Pushable buttons in the article buffer." | |
96 :link '(custom-manual "(gnus)Article Buttons") | |
97 :group 'gnus-article) | |
98 | |
99 (defgroup gnus-article-various nil | |
100 "Other article options." | |
101 :link '(custom-manual "(gnus)Misc Article") | |
102 :group 'gnus-article) | |
103 | |
104 (defcustom gnus-ignored-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
105 '("^Path:" "^Expires:" "^Date-Received:" "^References:" "^Xref:" "^Lines:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
106 "^Relay-Version:" "^Message-ID:" "^Approved:" "^Sender:" "^Received:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
107 "^X-UIDL:" "^MIME-Version:" "^Return-Path:" "^In-Reply-To:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
108 "^Content-Type:" "^Content-Transfer-Encoding:" "^X-WebTV-Signature:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
109 "^X-MimeOLE:" "^X-MSMail-Priority:" "^X-Priority:" "^X-Loop:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
110 "^X-Authentication-Warning:" "^X-MIME-Autoconverted:" "^X-Face:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
111 "^X-Attribution:" "^X-Originating-IP:" "^Delivered-To:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
112 "^NNTP-[-A-Za-z]+:" "^Distribution:" "^X-no-archive:" "^X-Trace:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
113 "^X-Complaints-To:" "^X-NNTP-Posting-Host:" "^X-Orig.*:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
114 "^Abuse-Reports-To:" "^Cache-Post-Path:" "^X-Article-Creation-Date:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
115 "^X-Poster:" "^X-Mail2News-Path:" "^X-Server-Date:" "^X-Cache:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
116 "^Originator:" "^X-Problems-To:" "^X-Auth-User:" "^X-Post-Time:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
117 "^X-Admin:" "^X-UID:" "^Resent-[-A-Za-z]+:" "^X-Mailing-List:" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
118 "^Precedence:" "^Original-[-A-Za-z]+:" "^X-filename:" "^X-Orcpt:" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
119 "^Old-Received:" "^X-Pgp" "^X-Auth:" "^X-From-Line:" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
120 "^X-Gnus-Article-Number:" "^X-Majordomo:" "^X-Url:" "^X-Sender:" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
121 "^MBOX-Line" "^Priority:" "^X-Pgp" "^X400-[-A-Za-z]+:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
122 "^Status:" "^X-Gnus-Mail-Source:" "^Cancel-Lock:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
123 "^X-FTN" "^X-EXP32-SerialNo:" "^Encoding:" "^Importance:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
124 "^Autoforwarded:" "^Original-Encoded-Information-Types:" "^X-Ya-Pop3:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
125 "^X-Face-Version:" "^X-Vms-To:" "^X-ML-NAME:" "^X-ML-COUNT:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
126 "^Mailing-List:" "^X-finfo:" "^X-md5sum:" "^X-md5sum-Origin:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
127 "^X-Sun-Charset:" "^X-Accept-Language:" "^X-Envelope-Sender:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
128 "^List-[A-Za-z]+:" "^X-Listprocessor-Version:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
129 "^X-Received:" "^X-Distribute:" "^X-Sequence:" "^X-Juno-Line-Breaks:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
130 "^X-Notes-Item:" "^X-MS-TNEF-Correlator:" "^x-uunet-gateway:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
131 "^X-Received:" "^Content-length:" "X-precedence:") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
132 "*All headers that start with this regexp will be hidden. |
17493 | 133 This variable can also be a list of regexps of headers to be ignored. |
134 If `gnus-visible-headers' is non-nil, this variable will be ignored." | |
135 :type '(choice :custom-show nil | |
136 regexp | |
137 (repeat regexp)) | |
138 :group 'gnus-article-hiding) | |
139 | |
140 (defcustom gnus-visible-headers | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
141 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:\\|^X-Sent:" |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
142 "*All headers that do not match this regexp will be hidden. |
17493 | 143 This variable can also be a list of regexp of headers to remain visible. |
144 If this variable is non-nil, `gnus-ignored-headers' will be ignored." | |
145 :type '(repeat :value-to-internal (lambda (widget value) | |
146 (custom-split-regexp-maybe value)) | |
147 :match (lambda (widget value) | |
148 (or (stringp value) | |
149 (widget-editable-list-match widget value))) | |
150 regexp) | |
151 :group 'gnus-article-hiding) | |
152 | |
153 (defcustom gnus-sorted-header-list | |
154 '("^From:" "^Subject:" "^Summary:" "^Keywords:" "^Newsgroups:" | |
155 "^Followup-To:" "^To:" "^Cc:" "^Date:" "^Organization:") | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
156 "*This variable is a list of regular expressions. |
17493 | 157 If it is non-nil, headers that match the regular expressions will |
158 be placed first in the article buffer in the sequence specified by | |
159 this list." | |
160 :type '(repeat regexp) | |
161 :group 'gnus-article-hiding) | |
162 | |
163 (defcustom gnus-boring-article-headers '(empty followup-to reply-to) | |
164 "Headers that are only to be displayed if they have interesting data. | |
165 Possible values in this list are `empty', `newsgroups', `followup-to', | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
166 `reply-to', `date', `long-to', and `many-to'." |
17493 | 167 :type '(set (const :tag "Headers with no content." empty) |
168 (const :tag "Newsgroups with only one group." newsgroups) | |
169 (const :tag "Followup-to identical to newsgroups." followup-to) | |
170 (const :tag "Reply-to identical to from." reply-to) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
171 (const :tag "Date less than four days old." date) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
172 (const :tag "Very long To and/or Cc header." long-to) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
173 (const :tag "Multiple To and/or Cc headers." many-to)) |
17493 | 174 :group 'gnus-article-hiding) |
175 | |
176 (defcustom gnus-signature-separator '("^-- $" "^-- *$") | |
177 "Regexp matching signature separator. | |
178 This can also be a list of regexps. In that case, it will be checked | |
179 from head to tail looking for a separator. Searches will be done from | |
180 the end of the buffer." | |
181 :type '(repeat string) | |
182 :group 'gnus-article-signature) | |
183 | |
184 (defcustom gnus-signature-limit nil | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
185 "Provide a limit to what is considered a signature. |
17493 | 186 If it is a number, no signature may not be longer (in characters) than |
187 that number. If it is a floating point number, no signature may be | |
188 longer (in lines) than that number. If it is a function, the function | |
189 will be called without any parameters, and if it returns nil, there is | |
190 no signature in the buffer. If it is a string, it will be used as a | |
191 regexp. If it matches, the text in question is not a signature." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
192 :type '(choice (integer :value 200) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
193 (number :value 4.0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
194 (function :value fun) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
195 (regexp :value ".*")) |
17493 | 196 :group 'gnus-article-signature) |
197 | |
198 (defcustom gnus-hidden-properties '(invisible t intangible t) | |
199 "Property list to use for hiding text." | |
200 :type 'sexp | |
201 :group 'gnus-article-hiding) | |
202 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
203 ;; Fixme: This isn't the right thing for mixed graphical and and |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
204 ;; non-graphical frames in a session. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
205 ;; gnus-xmas.el overrides this for XEmacs. |
17493 | 206 (defcustom gnus-article-x-face-command |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
207 (if (and (fboundp 'image-type-available-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
208 (image-type-available-p 'xbm)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
209 'gnus-article-display-xface |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
210 (if gnus-article-compface-xbm |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
211 "{ echo '/* Width=48, Height=48 */'; uncompface; } | display -" |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
212 "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | \ |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
213 display -")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
214 "*String or function to be executed to display an X-Face header. |
17493 | 215 If it is a string, the command will be executed in a sub-shell |
216 asynchronously. The compressed face will be piped to this command." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
217 :type '(choice string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
218 (function-item gnus-article-display-xface) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
219 function) |
35759 | 220 :version "21.1" |
17493 | 221 :group 'gnus-article-washing) |
222 | |
223 (defcustom gnus-article-x-face-too-ugly nil | |
224 "Regexp matching posters whose face shouldn't be shown automatically." | |
23361
86b5dc6c12f5
(gnus-article-x-face-too-ugly): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
22584
diff
changeset
|
225 :type '(choice regexp (const nil)) |
17493 | 226 :group 'gnus-article-washing) |
227 | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
228 (defcustom gnus-article-banner-alist nil |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
229 "Banner alist for stripping. |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
230 For example, |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
231 ((egroups . \"^[ \\t\\n]*-------------------+\\\\( eGroups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))" |
33397 | 232 :version "21.1" |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
233 :type '(repeat (cons symbol regexp)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
234 :group 'gnus-article-washing) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
235 |
17493 | 236 (defcustom gnus-emphasis-alist |
237 (let ((format | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
238 "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)") |
17493 | 239 (types |
240 '(("_" "_" underline) | |
241 ("/" "/" italic) | |
242 ("\\*" "\\*" bold) | |
243 ("_/" "/_" underline-italic) | |
244 ("_\\*" "\\*_" underline-bold) | |
245 ("\\*/" "/\\*" bold-italic) | |
246 ("_\\*/" "/\\*_" underline-bold-italic)))) | |
247 `(("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" | |
248 2 3 gnus-emphasis-underline) | |
249 ,@(mapcar | |
250 (lambda (spec) | |
251 (list | |
252 (format format (car spec) (cadr spec)) | |
21486
900aecbf7d38
(gnus-emphasis-alist): Use nth, not caddr.
Karl Heuer <kwzh@gnu.org>
parents:
20119
diff
changeset
|
253 2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) |
17493 | 254 types))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
255 "*Alist that says how to fontify certain phrases. |
17493 | 256 Each item looks like this: |
257 | |
258 (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) | |
259 | |
260 The first element is a regular expression to be matched. The second | |
261 is a number that says what regular expression grouping used to find | |
262 the entire emphasized word. The third is a number that says what | |
263 regexp grouping should be displayed and highlighted. The fourth | |
264 is the face used for highlighting." | |
265 :type '(repeat (list :value ("" 0 0 default) | |
266 regexp | |
267 (integer :tag "Match group") | |
268 (integer :tag "Emphasize group") | |
269 face)) | |
270 :group 'gnus-article-emphasis) | |
271 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
272 (defcustom gnus-emphasize-whitespace-regexp "^[ \t]+\\|[ \t]*\n" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
273 "A regexp to describe whitespace which should not be emphasized. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
274 Typical values are \"^[ \\t]+\\\\|[ \\t]*\\n\" and \"[ \\t]+\\\\|[ \\t]*\\n\". |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
275 The former avoids underlining of leading and trailing whitespace, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
276 and the latter avoids underlining any whitespace at all." |
33397 | 277 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
278 :group 'gnus-article-emphasis |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
279 :type 'regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
280 |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
281 (defface gnus-emphasis-bold '((t (:weight bold))) |
17493 | 282 "Face used for displaying strong emphasized text (*word*)." |
283 :group 'gnus-article-emphasis) | |
284 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
285 (defface gnus-emphasis-italic '((t (:slant italic))) |
17493 | 286 "Face used for displaying italic emphasized text (/word/)." |
287 :group 'gnus-article-emphasis) | |
288 | |
289 (defface gnus-emphasis-underline '((t (:underline t))) | |
290 "Face used for displaying underlined emphasized text (_word_)." | |
291 :group 'gnus-article-emphasis) | |
292 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
293 (defface gnus-emphasis-underline-bold '((t (:weight bold :underline t))) |
17493 | 294 "Face used for displaying underlined bold emphasized text (_*word*_)." |
295 :group 'gnus-article-emphasis) | |
296 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
297 (defface gnus-emphasis-underline-italic '((t (:slant italic :underline t))) |
25382
925a1c3dd62a
(gnus-emphasis-underline-italic): Doc fix.
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
298 "Face used for displaying underlined italic emphasized text (_/word/_)." |
17493 | 299 :group 'gnus-article-emphasis) |
300 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
301 (defface gnus-emphasis-bold-italic '((t (:weight bold :slant italic))) |
17493 | 302 "Face used for displaying bold italic emphasized text (/*word*/)." |
303 :group 'gnus-article-emphasis) | |
304 | |
305 (defface gnus-emphasis-underline-bold-italic | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
306 '((t (:weight bold :slant italic :underline t))) |
17493 | 307 "Face used for displaying underlined bold italic emphasized text. |
308 Esample: (_/*word*/_)." | |
309 :group 'gnus-article-emphasis) | |
310 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
311 (defface gnus-emphasis-highlight-words |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
312 '((t (:background "black" :foreground "yellow"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
313 "Face used for displaying highlighted words." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
314 :group 'gnus-article-emphasis) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
315 |
17493 | 316 (defcustom gnus-article-time-format "%a, %b %d %Y %T %Z" |
317 "Format for display of Date headers in article bodies. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
318 See `format-time-string' for the possible values. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
319 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
320 The variable can also be function, which should return a complete Date |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
321 header. The function is called with one argument, the time, which can |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
322 be fed to `format-time-string'." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
323 :type '(choice string symbol) |
17493 | 324 :link '(custom-manual "(gnus)Article Date") |
325 :group 'gnus-article-washing) | |
326 | |
327 (eval-and-compile | |
328 (autoload 'mail-extract-address-components "mail-extr")) | |
329 | |
330 (defcustom gnus-save-all-headers t | |
331 "*If non-nil, don't remove any headers before saving." | |
332 :group 'gnus-article-saving | |
333 :type 'boolean) | |
334 | |
335 (defcustom gnus-prompt-before-saving 'always | |
336 "*This variable says how much prompting is to be done when saving articles. | |
337 If it is nil, no prompting will be done, and the articles will be | |
338 saved to the default files. If this variable is `always', each and | |
339 every article that is saved will be preceded by a prompt, even when | |
340 saving large batches of articles. If this variable is neither nil not | |
341 `always', there the user will be prompted once for a file name for | |
342 each invocation of the saving commands." | |
343 :group 'gnus-article-saving | |
344 :type '(choice (item always) | |
345 (item :tag "never" nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
346 (sexp :tag "once" :format "%t\n" :value t))) |
17493 | 347 |
348 (defcustom gnus-saved-headers gnus-visible-headers | |
349 "Headers to keep if `gnus-save-all-headers' is nil. | |
350 If `gnus-save-all-headers' is non-nil, this variable will be ignored. | |
351 If that variable is nil, however, all headers that match this regexp | |
352 will be kept while the rest will be deleted before saving." | |
353 :group 'gnus-article-saving | |
23361
86b5dc6c12f5
(gnus-article-x-face-too-ugly): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
22584
diff
changeset
|
354 :type 'regexp) |
17493 | 355 |
356 (defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail | |
357 "A function to save articles in your favourite format. | |
358 The function must be interactively callable (in other words, it must | |
359 be an Emacs command). | |
360 | |
361 Gnus provides the following functions: | |
362 | |
363 * gnus-summary-save-in-rmail (Rmail format) | |
364 * gnus-summary-save-in-mail (Unix mail format) | |
365 * gnus-summary-save-in-folder (MH folder) | |
366 * gnus-summary-save-in-file (article format) | |
367 * gnus-summary-save-in-vm (use VM's folder format) | |
368 * gnus-summary-write-to-file (article format -- overwrite)." | |
369 :group 'gnus-article-saving | |
370 :type '(radio (function-item gnus-summary-save-in-rmail) | |
371 (function-item gnus-summary-save-in-mail) | |
372 (function-item gnus-summary-save-in-folder) | |
373 (function-item gnus-summary-save-in-file) | |
374 (function-item gnus-summary-save-in-vm) | |
375 (function-item gnus-summary-write-to-file))) | |
376 | |
377 (defcustom gnus-rmail-save-name 'gnus-plain-save-name | |
378 "A function generating a file name to save articles in Rmail format. | |
379 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
380 :group 'gnus-article-saving | |
381 :type 'function) | |
382 | |
383 (defcustom gnus-mail-save-name 'gnus-plain-save-name | |
384 "A function generating a file name to save articles in Unix mail format. | |
385 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
386 :group 'gnus-article-saving | |
387 :type 'function) | |
388 | |
389 (defcustom gnus-folder-save-name 'gnus-folder-save-name | |
390 "A function generating a file name to save articles in MH folder. | |
391 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER." | |
392 :group 'gnus-article-saving | |
393 :type 'function) | |
394 | |
395 (defcustom gnus-file-save-name 'gnus-numeric-save-name | |
396 "A function generating a file name to save articles in article format. | |
397 The function is called with NEWSGROUP, HEADERS, and optional | |
398 LAST-FILE." | |
399 :group 'gnus-article-saving | |
400 :type 'function) | |
401 | |
402 (defcustom gnus-split-methods | |
403 '((gnus-article-archive-name) | |
404 (gnus-article-nndoc-name)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
405 "*Variable used to suggest where articles are to be saved. |
17493 | 406 For instance, if you would like to save articles related to Gnus in |
407 the file \"gnus-stuff\", and articles related to VM in \"vm-stuff\", | |
408 you could set this variable to something like: | |
409 | |
410 '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\") | |
411 (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\")) | |
412 | |
413 This variable is an alist where the where the key is the match and the | |
414 value is a list of possible files to save in if the match is non-nil. | |
415 | |
416 If the match is a string, it is used as a regexp match on the | |
417 article. If the match is a symbol, that symbol will be funcalled | |
418 from the buffer of the article to be saved with the newsgroup as the | |
419 parameter. If it is a list, it will be evaled in the same buffer. | |
420 | |
421 If this form or function returns a string, this string will be used as | |
422 a possible file name; and if it returns a non-nil list, that list will | |
423 be used as possible file names." | |
424 :group 'gnus-article-saving | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
425 :type '(repeat (choice (list :value (fun) function) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
426 (cons :value ("" "") regexp (repeat string)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
427 (sexp :value nil)))) |
17493 | 428 |
429 (defcustom gnus-page-delimiter "^\^L" | |
430 "*Regexp describing what to use as article page delimiters. | |
431 The default value is \"^\^L\", which is a form linefeed at the | |
432 beginning of a line." | |
433 :type 'regexp | |
434 :group 'gnus-article-various) | |
435 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
436 (defcustom gnus-article-mode-line-format "Gnus: %g [%w] %S%m" |
17493 | 437 "*The format specification for the article mode line. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
438 See `gnus-summary-mode-line-format' for a closer description. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
439 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
440 The following additional specs are available: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
441 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
442 %w The article washing status. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
443 %m The number of MIME parts in the article." |
17493 | 444 :type 'string |
445 :group 'gnus-article-various) | |
446 | |
447 (defcustom gnus-article-mode-hook nil | |
448 "*A hook for Gnus article mode." | |
449 :type 'hook | |
450 :group 'gnus-article-various) | |
451 | |
452 (defcustom gnus-article-menu-hook nil | |
453 "*Hook run after the creation of the article mode menu." | |
454 :type 'hook | |
455 :group 'gnus-article-various) | |
456 | |
457 (defcustom gnus-article-prepare-hook nil | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
458 "*A hook called after an article has been prepared in the article buffer." |
17493 | 459 :type 'hook |
460 :group 'gnus-article-various) | |
461 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
462 (defcustom gnus-article-hide-pgp-hook nil |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
463 "*A hook called after successfully hiding a PGP signature." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
464 :type 'hook |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
465 :group 'gnus-article-various) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
466 |
17493 | 467 (defcustom gnus-article-button-face 'bold |
468 "Face used for highlighting buttons in the article buffer. | |
469 | |
470 An article button is a piece of text that you can activate by pressing | |
471 `RET' or `mouse-2' above it." | |
472 :type 'face | |
473 :group 'gnus-article-buttons) | |
474 | |
475 (defcustom gnus-article-mouse-face 'highlight | |
476 "Face used for mouse highlighting in the article buffer. | |
477 | |
478 Article buttons will be displayed in this face when the cursor is | |
479 above them." | |
480 :type 'face | |
481 :group 'gnus-article-buttons) | |
482 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
483 (defcustom gnus-signature-face 'gnus-signature-face |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
484 "Face used for highlighting a signature in the article buffer. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
485 Obsolete; use the face `gnus-signature-face' for customizations instead." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
486 :type 'face |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
487 :group 'gnus-article-highlight |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
488 :group 'gnus-article-signature) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
489 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
490 (defface gnus-signature-face |
32927
c0b62376988c
(gnus-signature-face): Use italics on all terminals that support it.
Jason Rumney <jasonr@gnu.org>
parents:
32210
diff
changeset
|
491 '((t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
492 (:slant italic))) |
17493 | 493 "Face used for highlighting a signature in the article buffer." |
494 :group 'gnus-article-highlight | |
495 :group 'gnus-article-signature) | |
496 | |
497 (defface gnus-header-from-face | |
498 '((((class color) | |
499 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
500 (:foreground "spring green")) |
17493 | 501 (((class color) |
502 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
503 (:foreground "red3")) |
17493 | 504 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
505 (:slant italic))) |
17493 | 506 "Face used for displaying from headers." |
507 :group 'gnus-article-headers | |
508 :group 'gnus-article-highlight) | |
509 | |
510 (defface gnus-header-subject-face | |
511 '((((class color) | |
512 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
513 (:foreground "SeaGreen3")) |
17493 | 514 (((class color) |
515 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
516 (:foreground "red4")) |
17493 | 517 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
518 (:weight bold :slant italic))) |
17493 | 519 "Face used for displaying subject headers." |
520 :group 'gnus-article-headers | |
521 :group 'gnus-article-highlight) | |
522 | |
523 (defface gnus-header-newsgroups-face | |
524 '((((class color) | |
525 (background dark)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
526 (:foreground "yellow" :slant italic)) |
17493 | 527 (((class color) |
528 (background light)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
529 (:foreground "MidnightBlue" :slant italic)) |
17493 | 530 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
531 (:slant italic))) |
17493 | 532 "Face used for displaying newsgroups headers." |
533 :group 'gnus-article-headers | |
534 :group 'gnus-article-highlight) | |
535 | |
536 (defface gnus-header-name-face | |
537 '((((class color) | |
538 (background dark)) | |
539 (:foreground "SeaGreen")) | |
540 (((class color) | |
541 (background light)) | |
542 (:foreground "maroon")) | |
543 (t | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
544 (:weight bold))) |
17493 | 545 "Face used for displaying header names." |
546 :group 'gnus-article-headers | |
547 :group 'gnus-article-highlight) | |
548 | |
549 (defface gnus-header-content-face | |
550 '((((class color) | |
551 (background dark)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
552 (:foreground "forest green" :slant italic)) |
17493 | 553 (((class color) |
554 (background light)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
555 (:foreground "indianred4" :slant italic)) |
17493 | 556 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
557 (:slant italic))) "Face used for displaying header content." |
17493 | 558 :group 'gnus-article-headers |
559 :group 'gnus-article-highlight) | |
560 | |
561 (defcustom gnus-header-face-alist | |
562 '(("From" nil gnus-header-from-face) | |
563 ("Subject" nil gnus-header-subject-face) | |
564 ("Newsgroups:.*," nil gnus-header-newsgroups-face) | |
565 ("" gnus-header-name-face gnus-header-content-face)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
566 "*Controls highlighting of article header. |
17493 | 567 |
568 An alist of the form (HEADER NAME CONTENT). | |
569 | |
570 HEADER is a regular expression which should match the name of an | |
571 header header and NAME and CONTENT are either face names or nil. | |
572 | |
573 The name of each header field will be displayed using the face | |
574 specified by the first element in the list where HEADER match the | |
575 header name and NAME is non-nil. Similarly, the content will be | |
576 displayed by the first non-nil matching CONTENT face." | |
577 :group 'gnus-article-headers | |
578 :group 'gnus-article-highlight | |
579 :type '(repeat (list (regexp :tag "Header") | |
580 (choice :tag "Name" | |
581 (item :tag "skip" nil) | |
582 (face :value default)) | |
583 (choice :tag "Content" | |
584 (item :tag "skip" nil) | |
585 (face :value default))))) | |
586 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
587 (defcustom gnus-article-decode-hook |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
588 '(article-decode-charset article-decode-encoded-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
589 "*Hook run to decode charsets in articles." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
590 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
591 :type 'hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
592 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
593 (defcustom gnus-display-mime-function 'gnus-display-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
594 "Function to display MIME articles." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
595 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
596 :type 'function) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
597 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
598 (defvar gnus-decode-header-function 'mail-decode-encoded-word-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
599 "Function used to decode headers.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
600 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
601 (defvar gnus-article-dumbquotes-map |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
602 '(("\202" ",") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
603 ("\203" "f") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
604 ("\204" ",,") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
605 ("\205" "...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
606 ("\213" "<") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
607 ("\214" "OE") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
608 ("\221" "`") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
609 ("\222" "'") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
610 ("\223" "``") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
611 ("\224" "\"") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
612 ("\225" "*") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
613 ("\226" "-") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
614 ("\227" "--") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
615 ("\231" "(TM)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
616 ("\233" ">") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
617 ("\234" "oe") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
618 ("\264" "'")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
619 "Table for MS-to-Latin1 translation.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
620 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
621 (defcustom gnus-ignored-mime-types nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
622 "List of MIME types that should be ignored by Gnus." |
33397 | 623 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
624 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
625 :type '(repeat regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
626 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
627 (defcustom gnus-unbuttonized-mime-types '(".*/.*") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
628 "List of MIME types that should not be given buttons when rendered inline." |
33397 | 629 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
630 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
631 :type '(repeat regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
632 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
633 (defcustom gnus-article-mime-part-function nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
634 "Function called with a MIME handle as the argument. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
635 This is meant for people who want to do something automatic based |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
636 on parts -- for instance, adding Vcard info to a database." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
637 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
638 :type 'function) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
639 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
640 (defcustom gnus-mime-multipart-functions nil |
33397 | 641 "An alist of MIME types to functions to display them." |
642 :version "21.1" | |
643 :group 'gnus-article-mime | |
644 :type 'alist) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
645 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
646 (defcustom gnus-article-date-lapsed-new-header nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
647 "Whether the X-Sent and Date headers can coexist. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
648 When using `gnus-treat-date-lapsed', the \"X-Sent:\" header will |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
649 either replace the old \"Date:\" header (if this variable is nil), or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
650 be added below it (otherwise)." |
33397 | 651 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
652 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
653 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
654 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
655 (defcustom gnus-article-mime-match-handle-function 'undisplayed-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
656 "Function called with a MIME handle as the argument. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
657 This is meant for people who want to view first matched part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
658 For `undisplayed-alternative' (default), the first undisplayed |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
659 part or alternative part is used. For `undisplayed', the first |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
660 undisplayed part is used. For a function, the first part which |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
661 the function return `t' is used. For `nil', the first part is |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
662 used." |
33397 | 663 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
664 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
665 :type '(choice |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
666 (item :tag "first" :value nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
667 (item :tag "undisplayed" :value undisplayed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
668 (item :tag "undisplayed or alternative" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
669 :value undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
670 (function))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
671 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
672 (defcustom gnus-mime-action-alist |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
673 '(("save to file" . gnus-mime-save-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
674 ("display as text" . gnus-mime-inline-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
675 ("view the part" . gnus-mime-view-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
676 ("pipe to command" . gnus-mime-pipe-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
677 ("toggle display" . gnus-article-press-button) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
678 ("view as type" . gnus-mime-view-part-as-type) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
679 ("internalize type" . gnus-mime-internalize-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
680 ("externalize type" . gnus-mime-externalize-part)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
681 "An alist of actions that run on the MIME attachment." |
33397 | 682 :version "21.1" |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
683 :group 'gnus-article-mime |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
684 :type '(repeat (cons (string :tag "name") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
685 (function)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
686 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
687 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
688 ;;; The treatment variables |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
689 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
690 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
691 (defvar gnus-part-display-hook nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
692 "Hook called on parts that are to receive treatment.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
693 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
694 (defvar gnus-article-treat-custom |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
695 '(choice (const :tag "Off" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
696 (const :tag "On" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
697 (const :tag "Header" head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
698 (const :tag "Last" last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
699 (integer :tag "Less") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
700 (repeat :tag "Groups" regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
701 (sexp :tag "Predicate"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
702 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
703 (defvar gnus-article-treat-head-custom |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
704 '(choice (const :tag "Off" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
705 (const :tag "Header" head))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
706 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
707 (defvar gnus-article-treat-types '("text/plain") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
708 "Parts to treat.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
709 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
710 (defvar gnus-inhibit-treatment nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
711 "Whether to inhibit treatment.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
712 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
713 (defcustom gnus-treat-highlight-signature '(or last (typep "text/x-vcard")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
714 "Highlight the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
715 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
716 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
717 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
718 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
719 (put 'gnus-treat-highlight-signature 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
720 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
721 (defcustom gnus-treat-buttonize 100000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
722 "Add buttons. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
723 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
724 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
725 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
726 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
727 (put 'gnus-treat-buttonize 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
728 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
729 (defcustom gnus-treat-buttonize-head 'head |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
730 "Add buttons to the head. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
731 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
732 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
733 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
734 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
735 (put 'gnus-treat-buttonize-head 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
736 |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
737 (defcustom gnus-treat-emphasize |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
738 (and (or window-system |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
739 (featurep 'xemacs) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
740 (>= (string-to-number emacs-version) 21)) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
741 50000) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
742 "Emphasize text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
743 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
744 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
745 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
746 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
747 (put 'gnus-treat-emphasize 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
748 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
749 (defcustom gnus-treat-strip-cr nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
750 "Remove carriage returns. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
751 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
752 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
753 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
754 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
755 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
756 (defcustom gnus-treat-hide-headers 'head |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
757 "Hide headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
758 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
759 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
760 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
761 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
762 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
763 (defcustom gnus-treat-hide-boring-headers nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
764 "Hide boring headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
765 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
766 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
767 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
768 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
769 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
770 (defcustom gnus-treat-hide-signature nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
771 "Hide the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
772 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
773 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
774 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
775 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
776 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
777 (defcustom gnus-treat-fill-article nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
778 "Fill the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
779 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
780 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
781 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
782 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
783 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
784 (defcustom gnus-treat-hide-citation nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
785 "Hide cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
786 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
787 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
788 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
789 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
790 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
791 (defcustom gnus-treat-hide-citation-maybe nil |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
792 "Hide cited text. |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
793 Valid values are nil, t, `head', `last', an integer or a predicate. |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
794 See the manual for details." |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
795 :group 'gnus-article-treat |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
796 :type gnus-article-treat-custom) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
797 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
798 (defcustom gnus-treat-strip-list-identifiers 'head |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
799 "Strip list identifiers from `gnus-list-identifiers`. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
800 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
801 See the manual for details." |
33397 | 802 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
803 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
804 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
805 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
806 (defcustom gnus-treat-strip-pgp t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
807 "Strip PGP signatures. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
808 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
809 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
810 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
811 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
812 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
813 (defcustom gnus-treat-strip-pem nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
814 "Strip PEM signatures. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
815 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
816 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
817 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
818 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
819 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
820 (defcustom gnus-treat-strip-banner t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
821 "Strip banners from articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
822 The banner to be stripped is specified in the `banner' group parameter. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
823 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
824 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
825 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
826 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
827 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
828 (defcustom gnus-treat-highlight-headers 'head |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
829 "Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
830 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
831 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
832 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
833 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
834 (put 'gnus-treat-highlight-headers 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
835 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
836 (defcustom gnus-treat-highlight-citation t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
837 "Highlight cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
838 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
839 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
840 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
841 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
842 (put 'gnus-treat-highlight-citation 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
843 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
844 (defcustom gnus-treat-date-ut nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
845 "Display the Date in UT (GMT). |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
846 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
847 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
848 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
849 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
850 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
851 (defcustom gnus-treat-date-local nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
852 "Display the Date in the local timezone. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
853 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
854 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
855 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
856 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
857 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
858 (defcustom gnus-treat-date-lapsed nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
859 "Display the Date header in a way that says how much time has elapsed. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
860 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
861 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
862 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
863 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
864 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
865 (defcustom gnus-treat-date-original nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
866 "Display the date in the original timezone. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
867 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
868 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
869 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
870 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
871 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
872 (defcustom gnus-treat-date-iso8601 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
873 "Display the date in the ISO8601 format. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
874 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
875 See the manual for details." |
33397 | 876 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
877 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
878 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
879 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
880 (defcustom gnus-treat-date-user-defined nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
881 "Display the date in a user-defined format. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
882 The format is defined by the `gnus-article-time-format' variable. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
883 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
884 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
885 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
886 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
887 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
888 (defcustom gnus-treat-strip-headers-in-body t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
889 "Strip the X-No-Archive header line from the beginning of the body. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
890 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
891 See the manual for details." |
33397 | 892 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
893 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
894 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
895 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
896 (defcustom gnus-treat-strip-trailing-blank-lines nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
897 "Strip trailing blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
898 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
899 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
900 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
901 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
902 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
903 (defcustom gnus-treat-strip-leading-blank-lines nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
904 "Strip leading blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
905 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
906 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
907 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
908 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
909 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
910 (defcustom gnus-treat-strip-multiple-blank-lines nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
911 "Strip multiple blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
912 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
913 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
914 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
915 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
916 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
917 (defcustom gnus-treat-overstrike t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
918 "Treat overstrike highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
919 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
920 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
921 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
922 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
923 (put 'gnus-treat-overstrike 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
924 |
31785 | 925 (defcustom gnus-treat-display-xface |
926 (and (or (and (fboundp 'image-type-available-p) | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
927 (image-type-available-p 'xbm) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
928 (string-match "^0x" (shell-command-to-string "uncompface"))) |
32939
c8119677d63e
Use (featurep 'xemacs) instead of the `gnus-xemacs' variable, as the
Miles Bader <miles@gnu.org>
parents:
32927
diff
changeset
|
929 (and (featurep 'xemacs) (featurep 'xface))) |
31785 | 930 'head) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
931 "Display X-Face headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
932 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
933 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
934 :group 'gnus-article-treat |
35759 | 935 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
936 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
937 (put 'gnus-treat-display-xface 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
938 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
939 (defcustom gnus-treat-display-smileys |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
940 (if (or (and (featurep 'xemacs) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
941 (featurep 'xpm)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
942 (and (fboundp 'image-type-available-p) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
943 (image-type-available-p 'pbm))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
944 t nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
945 "Display smileys. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
946 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
947 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
948 :group 'gnus-article-treat |
35759 | 949 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
950 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
951 (put 'gnus-treat-display-smileys 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
952 |
32939
c8119677d63e
Use (featurep 'xemacs) instead of the `gnus-xemacs' variable, as the
Miles Bader <miles@gnu.org>
parents:
32927
diff
changeset
|
953 (defcustom gnus-treat-display-picons (if (featurep 'xemacs) 'head nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
954 "Display picons. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
955 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
956 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
957 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
958 :type gnus-article-treat-head-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
959 (put 'gnus-treat-display-picons 'highlight t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
960 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
961 (defcustom gnus-treat-capitalize-sentences nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
962 "Capitalize sentence-starting words. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
963 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
964 See the manual for details." |
33397 | 965 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
966 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
967 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
968 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
969 (defcustom gnus-treat-fill-long-lines nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
970 "Fill long lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
971 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
972 See the manual for details." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
973 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
974 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
975 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
976 (defcustom gnus-treat-play-sounds nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
977 "Play sounds. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
978 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
979 See the manual for details." |
33397 | 980 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
981 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
982 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
983 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
984 (defcustom gnus-treat-translate nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
985 "Translate articles from one language to another. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
986 Valid values are nil, t, `head', `last', an integer or a predicate. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
987 See the manual for details." |
33397 | 988 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
989 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
990 :type gnus-article-treat-custom) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
991 |
17493 | 992 ;;; Internal variables |
993 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
994 (defvar article-goto-body-goes-to-point-min-p nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
995 (defvar gnus-article-wash-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
996 (defvar gnus-article-emphasis-alist nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
997 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
998 (defvar gnus-article-mime-handle-alist-1 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
999 (defvar gnus-treatment-function-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1000 '((gnus-treat-strip-banner gnus-article-strip-banner) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1001 (gnus-treat-strip-headers-in-body gnus-article-strip-headers-in-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1002 (gnus-treat-highlight-signature gnus-article-highlight-signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1003 (gnus-treat-buttonize gnus-article-add-buttons) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1004 (gnus-treat-fill-article gnus-article-fill-cited-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1005 (gnus-treat-fill-long-lines gnus-article-fill-long-lines) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1006 (gnus-treat-strip-cr gnus-article-remove-cr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1007 (gnus-treat-emphasize gnus-article-emphasize) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1008 (gnus-treat-display-xface gnus-article-display-x-face) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1009 (gnus-treat-hide-headers gnus-article-maybe-hide-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1010 (gnus-treat-hide-boring-headers gnus-article-hide-boring-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1011 (gnus-treat-hide-signature gnus-article-hide-signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1012 (gnus-treat-hide-citation gnus-article-hide-citation) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1013 (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1014 (gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1015 (gnus-treat-strip-pgp gnus-article-hide-pgp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1016 (gnus-treat-strip-pem gnus-article-hide-pem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1017 (gnus-treat-highlight-headers gnus-article-highlight-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1018 (gnus-treat-highlight-citation gnus-article-highlight-citation) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1019 (gnus-treat-highlight-signature gnus-article-highlight-signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1020 (gnus-treat-date-ut gnus-article-date-ut) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1021 (gnus-treat-date-local gnus-article-date-local) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1022 (gnus-treat-date-lapsed gnus-article-date-lapsed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1023 (gnus-treat-date-original gnus-article-date-original) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1024 (gnus-treat-date-user-defined gnus-article-date-user) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1025 (gnus-treat-date-iso8601 gnus-article-date-iso8601) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1026 (gnus-treat-strip-trailing-blank-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1027 gnus-article-remove-trailing-blank-lines) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1028 (gnus-treat-strip-leading-blank-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1029 gnus-article-strip-leading-blank-lines) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1030 (gnus-treat-strip-multiple-blank-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1031 gnus-article-strip-multiple-blank-lines) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1032 (gnus-treat-overstrike gnus-article-treat-overstrike) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1033 (gnus-treat-buttonize-head gnus-article-add-buttons-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1034 (gnus-treat-display-smileys gnus-smiley-display) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1035 (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1036 (gnus-treat-display-picons gnus-article-display-picons) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1037 (gnus-treat-play-sounds gnus-earcon-display))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1038 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1039 (defvar gnus-article-mime-handle-alist nil) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1040 (defvar article-lapsed-timer nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1041 (defvar gnus-article-current-summary nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1042 |
17493 | 1043 (defvar gnus-article-mode-syntax-table |
1044 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
1045 (modify-syntax-entry ?- "w" table) | |
1046 (modify-syntax-entry ?> ")" table) | |
1047 (modify-syntax-entry ?< "(" table) | |
1048 table) | |
1049 "Syntax table used in article mode buffers. | |
1050 Initialized from `text-mode-syntax-table.") | |
1051 | |
1052 (defvar gnus-save-article-buffer nil) | |
1053 | |
1054 (defvar gnus-article-mode-line-format-alist | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1055 (nconc '((?w (gnus-article-wash-status) ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1056 (?m (gnus-article-mime-part-status) ?s)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1057 gnus-summary-mode-line-format-alist)) |
17493 | 1058 |
1059 (defvar gnus-number-of-articles-to-be-saved nil) | |
1060 | |
1061 (defvar gnus-inhibit-hiding nil) | |
1062 | |
1063 (defsubst gnus-article-hide-text (b e props) | |
1064 "Set text PROPS on the B to E region, extending `intangible' 1 past B." | |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
1065 (gnus-add-text-properties-when 'article-type nil b e props) |
17493 | 1066 (when (memq 'intangible props) |
1067 (put-text-property | |
1068 (max (1- b) (point-min)) | |
1069 b 'intangible (cddr (memq 'intangible props))))) | |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
1070 |
17493 | 1071 (defsubst gnus-article-unhide-text (b e) |
1072 "Remove hidden text properties from region between B and E." | |
1073 (remove-text-properties b e gnus-hidden-properties) | |
1074 (when (memq 'intangible gnus-hidden-properties) | |
1075 (put-text-property (max (1- b) (point-min)) | |
1076 b 'intangible nil))) | |
1077 | |
1078 (defun gnus-article-hide-text-type (b e type) | |
1079 "Hide text of TYPE between B and E." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1080 (push type gnus-article-wash-types) |
17493 | 1081 (gnus-article-hide-text |
1082 b e (cons 'article-type (cons type gnus-hidden-properties)))) | |
1083 | |
1084 (defun gnus-article-unhide-text-type (b e type) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1085 "Unhide text of TYPE between B and E." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1086 (setq gnus-article-wash-types |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1087 (delq type gnus-article-wash-types)) |
17493 | 1088 (remove-text-properties |
1089 b e (cons 'article-type (cons type gnus-hidden-properties))) | |
1090 (when (memq 'intangible gnus-hidden-properties) | |
1091 (put-text-property (max (1- b) (point-min)) | |
1092 b 'intangible nil))) | |
1093 | |
1094 (defun gnus-article-hide-text-of-type (type) | |
1095 "Hide text of TYPE in the current buffer." | |
1096 (save-excursion | |
1097 (let ((b (point-min)) | |
1098 (e (point-max))) | |
1099 (while (setq b (text-property-any b e 'article-type type)) | |
1100 (add-text-properties b (incf b) gnus-hidden-properties))))) | |
1101 | |
1102 (defun gnus-article-delete-text-of-type (type) | |
1103 "Delete text of TYPE in the current buffer." | |
1104 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1105 (let ((b (point-min))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1106 (while (setq b (text-property-any b (point-max) 'article-type type)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1107 (delete-region |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1108 b (or (text-property-not-all b (point-max) 'article-type type) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1109 (point-max))))))) |
17493 | 1110 |
1111 (defun gnus-article-delete-invisible-text () | |
1112 "Delete all invisible text in the current buffer." | |
1113 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1114 (let ((b (point-min))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1115 (while (setq b (text-property-any b (point-max) 'invisible t)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1116 (delete-region |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1117 b (or (text-property-not-all b (point-max) 'invisible t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1118 (point-max))))))) |
17493 | 1119 |
1120 (defun gnus-article-text-type-exists-p (type) | |
1121 "Say whether any text of type TYPE exists in the buffer." | |
1122 (text-property-any (point-min) (point-max) 'article-type type)) | |
1123 | |
1124 (defsubst gnus-article-header-rank () | |
1125 "Give the rank of the string HEADER as given by `gnus-sorted-header-list'." | |
1126 (let ((list gnus-sorted-header-list) | |
1127 (i 0)) | |
1128 (while list | |
1129 (when (looking-at (car list)) | |
1130 (setq list nil)) | |
1131 (setq list (cdr list)) | |
1132 (incf i)) | |
1133 i)) | |
1134 | |
1135 (defun article-hide-headers (&optional arg delete) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1136 "Hide unwanted headers and possibly sort them as well." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1137 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1138 ;; This function might be inhibited. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1139 (unless gnus-inhibit-hiding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1140 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1141 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1142 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1143 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1144 (max (1+ (length gnus-sorted-header-list))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1145 (ignored (when (not gnus-visible-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1146 (cond ((stringp gnus-ignored-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1147 gnus-ignored-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1148 ((listp gnus-ignored-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1149 (mapconcat 'identity gnus-ignored-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1150 "\\|"))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1151 (visible |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1152 (cond ((stringp gnus-visible-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1153 gnus-visible-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1154 ((and gnus-visible-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1155 (listp gnus-visible-headers)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1156 (mapconcat 'identity gnus-visible-headers "\\|")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1157 (inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1158 beg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1159 ;; First we narrow to just the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1160 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1161 ;; Hide any "From " lines at the beginning of (mail) articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1162 (while (looking-at "From ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1163 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1164 (unless (bobp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1165 (delete-region (point-min) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1166 ;; Then treat the rest of the header lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1167 ;; Then we use the two regular expressions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1168 ;; `gnus-ignored-headers' and `gnus-visible-headers' to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1169 ;; select which header lines is to remain visible in the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1170 ;; article buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1171 (while (re-search-forward "^[^ \t]*:" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1172 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1173 ;; Mark the rank of the header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1174 (put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1175 (point) (1+ (point)) 'message-rank |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1176 (if (or (and visible (looking-at visible)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1177 (and ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1178 (not (looking-at ignored)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1179 (gnus-article-header-rank) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1180 (+ 2 max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1181 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1182 (message-sort-headers-1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1183 (when (setq beg (text-property-any |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1184 (point-min) (point-max) 'message-rank (+ 2 max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1185 ;; We delete the unwanted headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1186 (push 'headers gnus-article-wash-types) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1187 (add-text-properties (point-min) (+ 5 (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1188 '(article-type headers dummy-invisible t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1189 (delete-region beg (point-max)))))))) |
17493 | 1190 |
1191 (defun article-hide-boring-headers (&optional arg) | |
1192 "Toggle hiding of headers that aren't very interesting. | |
1193 If given a negative prefix, always show; if given a positive prefix, | |
1194 always hide." | |
1195 (interactive (gnus-article-hidden-arg)) | |
1196 (when (and (not (gnus-article-check-hidden-text 'boring-headers arg)) | |
1197 (not gnus-show-all-headers)) | |
1198 (save-excursion | |
1199 (save-restriction | |
1200 (let ((buffer-read-only nil) | |
1201 (list gnus-boring-article-headers) | |
1202 (inhibit-point-motion-hooks t) | |
1203 elem) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1204 (article-narrow-to-head) |
17493 | 1205 (while list |
1206 (setq elem (pop list)) | |
1207 (goto-char (point-min)) | |
1208 (cond | |
1209 ;; Hide empty headers. | |
1210 ((eq elem 'empty) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1211 (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) |
17493 | 1212 (forward-line -1) |
1213 (gnus-article-hide-text-type | |
1214 (progn (beginning-of-line) (point)) | |
1215 (progn | |
1216 (end-of-line) | |
1217 (if (re-search-forward "^[^ \t]" nil t) | |
1218 (match-beginning 0) | |
1219 (point-max))) | |
1220 'boring-headers))) | |
1221 ;; Hide boring Newsgroups header. | |
1222 ((eq elem 'newsgroups) | |
1223 (when (equal (gnus-fetch-field "newsgroups") | |
1224 (gnus-group-real-name | |
1225 (if (boundp 'gnus-newsgroup-name) | |
1226 gnus-newsgroup-name | |
1227 ""))) | |
1228 (gnus-article-hide-header "newsgroups"))) | |
1229 ((eq elem 'followup-to) | |
1230 (when (equal (message-fetch-field "followup-to") | |
1231 (message-fetch-field "newsgroups")) | |
1232 (gnus-article-hide-header "followup-to"))) | |
1233 ((eq elem 'reply-to) | |
1234 (let ((from (message-fetch-field "from")) | |
1235 (reply-to (message-fetch-field "reply-to"))) | |
1236 (when (and | |
1237 from reply-to | |
1238 (ignore-errors | |
1239 (equal | |
1240 (nth 1 (mail-extract-address-components from)) | |
1241 (nth 1 (mail-extract-address-components reply-to))))) | |
1242 (gnus-article-hide-header "reply-to")))) | |
1243 ((eq elem 'date) | |
1244 (let ((date (message-fetch-field "date"))) | |
1245 (when (and date | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1246 (< (days-between (current-time-string) date) |
17493 | 1247 4)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1248 (gnus-article-hide-header "date")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1249 ((eq elem 'long-to) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1250 (let ((to (message-fetch-field "to")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1251 (cc (message-fetch-field "cc"))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1252 (when (> (length to) 1024) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1253 (gnus-article-hide-header "to")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1254 (when (> (length cc) 1024) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1255 (gnus-article-hide-header "cc")))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1256 ((eq elem 'many-to) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1257 (let ((to-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1258 (cc-count 0)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1259 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1260 (while (re-search-forward "^to:" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1261 (setq to-count (1+ to-count))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1262 (when (> to-count 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1263 (while (> to-count 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1264 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1265 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1266 (re-search-forward "^to:" nil nil to-count) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1267 (forward-line -1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1268 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1269 (gnus-article-hide-header "to")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1270 (setq to-count (1- to-count)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1271 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1272 (while (re-search-forward "^cc:" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1273 (setq cc-count (1+ cc-count))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1274 (when (> cc-count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1275 (while (> cc-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1276 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1277 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1278 (re-search-forward "^cc:" nil nil cc-count) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1279 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1280 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1281 (gnus-article-hide-header "cc")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1282 (setq cc-count (1- cc-count))))))))))))) |
17493 | 1283 |
1284 (defun gnus-article-hide-header (header) | |
1285 (save-excursion | |
1286 (goto-char (point-min)) | |
1287 (when (re-search-forward (concat "^" header ":") nil t) | |
1288 (gnus-article-hide-text-type | |
1289 (progn (beginning-of-line) (point)) | |
1290 (progn | |
1291 (end-of-line) | |
1292 (if (re-search-forward "^[^ \t]" nil t) | |
1293 (match-beginning 0) | |
1294 (point-max))) | |
1295 'boring-headers)))) | |
1296 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1297 (defvar gnus-article-normalized-header-length 40 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1298 "Length of normalized headers.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1299 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1300 (defun article-normalize-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1301 "Make all header lines 40 characters long." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1302 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1303 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1304 column) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1305 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1306 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1307 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1308 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1309 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1310 ((< (setq column (- (gnus-point-at-eol) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1311 gnus-article-normalized-header-length) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1312 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1313 (insert (make-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1314 (- gnus-article-normalized-header-length column) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1315 ? ))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1316 ((> column gnus-article-normalized-header-length) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1317 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1318 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1319 (forward-char gnus-article-normalized-header-length) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1320 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1321 (gnus-point-at-eol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1322 'invisible t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1323 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1324 ;; Do nothing. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1325 )) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1326 (forward-line 1)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1327 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1328 (defun article-treat-dumbquotes () |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1329 "Translate M****s*** sm*rtq**t*s into proper text. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1330 Note that this function guesses whether a character is a sm*rtq**t* or |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1331 not, so it should only be used interactively. |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1332 |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1333 Sm*rtq**t*s are M****s***'s unilateral extension to the character map |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1334 in an attempt to provide more quoting characters. If you see |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1335 something like \\222 or \\264 where you're expecting some kind of |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1336 apostrophe or quotation mark, then try this wash." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1337 (interactive) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1338 (article-translate-strings gnus-article-dumbquotes-map)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1339 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1340 (defun article-translate-characters (from to) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1341 "Translate all characters in the body of the article according to FROM and TO. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1342 FROM is a string of characters to translate from; to is a string of |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1343 characters to translate to." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1344 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1345 (when (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1346 (let ((buffer-read-only nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1347 (x (make-string 225 ?x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1348 (i -1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1349 (while (< (incf i) (length x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1350 (aset x i i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1351 (setq i 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1352 (while (< i (length from)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1353 (aset x (aref from i) (aref to i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1354 (incf i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1355 (translate-region (point) (point-max) x))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1356 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1357 (defun article-translate-strings (map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1358 "Translate all string in the body of the article according to MAP. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1359 MAP is an alist where the elements are on the form (\"from\" \"to\")." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1360 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1361 (when (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1362 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1363 elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1364 (while (setq elem (pop map)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1365 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1366 (while (search-forward (car elem) nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1367 (replace-match (cadr elem))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1368 |
17493 | 1369 (defun article-treat-overstrike () |
1370 "Translate overstrikes into bold text." | |
1371 (interactive) | |
1372 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1373 (when (article-goto-body) |
17493 | 1374 (let ((buffer-read-only nil)) |
1375 (while (search-forward "\b" nil t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1376 (let ((next (char-after)) |
17493 | 1377 (previous (char-after (- (point) 2)))) |
1378 ;; We do the boldification/underlining by hiding the | |
1379 ;; overstrikes and putting the proper text property | |
1380 ;; on the letters. | |
1381 (cond | |
1382 ((eq next previous) | |
1383 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1384 (put-text-property (point) (1+ (point)) 'face 'bold)) | |
1385 ((eq next ?_) | |
1386 (gnus-article-hide-text-type | |
1387 (1- (point)) (1+ (point)) 'overstrike) | |
1388 (put-text-property | |
1389 (- (point) 2) (1- (point)) 'face 'underline)) | |
1390 ((eq previous ?_) | |
1391 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1392 (put-text-property | |
1393 (point) (1+ (point)) 'face 'underline))))))))) | |
1394 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1395 (defun article-fill-long-lines () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1396 "Fill lines that are wider than the window width." |
17493 | 1397 (interactive) |
1398 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1399 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1400 (width (window-width (get-buffer-window (current-buffer))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1401 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1402 (article-goto-body) |
43273
b8391c00e2c9
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43166
diff
changeset
|
1403 (let ((adaptive-fill-mode nil)) ;Why? -sm |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1404 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1405 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1406 (when (>= (current-column) (min fill-column width)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1407 (narrow-to-region (point) (gnus-point-at-bol)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1408 (fill-paragraph nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1409 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1410 (widen)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1411 (forward-line 1))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1412 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1413 (defun article-capitalize-sentences () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1414 "Capitalize the first word in each sentence." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1415 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1416 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1417 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1418 (paragraph-start "^[\n\^L]")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1419 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1420 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1421 (capitalize-word 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1422 (forward-sentence))))) |
17493 | 1423 |
1424 (defun article-remove-cr () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1425 "Remove trailing CRs and then translate remaining CRs into LFs." |
17493 | 1426 (interactive) |
1427 (save-excursion | |
1428 (let ((buffer-read-only nil)) | |
1429 (goto-char (point-min)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1430 (while (re-search-forward "\r+$" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1431 (replace-match "" t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1432 (goto-char (point-min)) |
17493 | 1433 (while (search-forward "\r" nil t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1434 (replace-match "\n" t t))))) |
17493 | 1435 |
1436 (defun article-remove-trailing-blank-lines () | |
1437 "Remove all trailing blank lines from the article." | |
1438 (interactive) | |
1439 (save-excursion | |
1440 (let ((buffer-read-only nil)) | |
1441 (goto-char (point-max)) | |
1442 (delete-region | |
1443 (point) | |
1444 (progn | |
1445 (while (and (not (bobp)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1446 (looking-at "^[ \t]*$") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1447 (not (gnus-annotation-in-region-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1448 (point) (gnus-point-at-eol)))) |
17493 | 1449 (forward-line -1)) |
1450 (forward-line 1) | |
1451 (point)))))) | |
1452 | |
1453 (defun article-display-x-face (&optional force) | |
1454 "Look for an X-Face header and display it if present." | |
1455 (interactive (list 'force)) | |
1456 (save-excursion | |
1457 ;; Delete the old process, if any. | |
1458 (when (process-status "article-x-face") | |
1459 (delete-process "article-x-face")) | |
1460 (let ((inhibit-point-motion-hooks t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1461 (case-fold-search t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1462 from last) |
17493 | 1463 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1464 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1465 (goto-char (point-min)) |
17493 | 1466 (setq from (message-fetch-field "from")) |
1467 (goto-char (point-min)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1468 (while (and gnus-article-x-face-command |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1469 (not last) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1470 (or force |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1471 ;; Check whether this face is censored. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1472 (not gnus-article-x-face-too-ugly) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1473 (and gnus-article-x-face-too-ugly from |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1474 (not (string-match gnus-article-x-face-too-ugly |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1475 from)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1476 ;; Has to be present. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1477 (re-search-forward "^X-Face: " nil t)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1478 ;; This used to try to do multiple faces (`while' instead of |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1479 ;; `when' above), but (a) sending multiple EOFs to xv doesn't |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1480 ;; work (b) it can crash some versions of Emacs (c) are |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1481 ;; multiple faces really something to encourage? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1482 (when (stringp gnus-article-x-face-command) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1483 (setq last t)) |
17493 | 1484 ;; We now have the area of the buffer where the X-Face is stored. |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1485 (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1486 (let ((beg (point)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1487 (end (1- (re-search-forward "^\\($\\|[^ \t]\\)" nil t)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1488 ;; We display the face. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1489 (if (symbolp gnus-article-x-face-command) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1490 ;; The command is a lisp function, so we call it. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1491 (if (gnus-functionp gnus-article-x-face-command) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1492 (funcall gnus-article-x-face-command beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1493 (error "%s is not a function" gnus-article-x-face-command)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1494 ;; The command is a string, so we interpret the command |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1495 ;; as a, well, command, and fork it off. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1496 (let ((process-connection-type nil)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1497 (process-kill-without-query |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1498 (start-process |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1499 "article-x-face" nil shell-file-name shell-command-switch |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1500 gnus-article-x-face-command)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1501 (process-send-region "article-x-face" beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1502 (process-send-eof "article-x-face")))))))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1503 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1504 (defun article-decode-mime-words () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1505 "Decode all MIME-encoded words in the article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1506 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1507 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1508 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1509 (let ((inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1510 buffer-read-only |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1511 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1512 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1513 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1514 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1515 (mail-decode-encoded-word-region (point-min) (point-max))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1516 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1517 (defun article-decode-charset (&optional prompt) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1518 "Decode charset-encoded text in the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1519 If PROMPT (the prefix), prompt for a coding system to use." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1520 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1521 (let ((inhibit-point-motion-hooks t) (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1522 buffer-read-only |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1523 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1524 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1525 (save-excursion (condition-case nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1526 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1527 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1528 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1529 ct cte ctl charset format) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1530 (save-excursion |
17493 | 1531 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1532 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1533 (setq ct (message-fetch-field "Content-Type" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1534 cte (message-fetch-field "Content-Transfer-Encoding" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1535 ctl (and ct (ignore-errors |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1536 (mail-header-parse-content-type ct))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1537 charset (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1538 (prompt |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1539 (mm-read-coding-system "Charset to decode: ")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1540 (ctl |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1541 (mail-content-type-get ctl 'charset))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1542 format (and ctl (mail-content-type-get ctl 'format))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1543 (when cte |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1544 (setq cte (mail-header-strip cte))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1545 (if (and ctl (not (string-match "/" (car ctl)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1546 (setq ctl nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1547 (goto-char (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1548 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1549 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1550 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1551 (when (and (eq mail-parse-charset 'gnus-decoded) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1552 (eq (mm-body-7-or-8) '8bit)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1553 ;; The text code could have been decoded. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1554 (setq charset mail-parse-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1555 (when (and (or (not ctl) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1556 (equal (car ctl) "text/plain")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1557 (not format)) ;; article with format will decode later. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1558 (mm-decode-body |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1559 charset (and cte (intern (downcase |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1560 (gnus-strip-whitespace cte)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1561 (car ctl))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1562 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1563 (defun article-decode-encoded-words () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1564 "Remove encoded-word encoding from headers." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1565 (let ((inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1566 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1567 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1568 (save-excursion (condition-case nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1569 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1570 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1571 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1572 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1573 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1574 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1575 (funcall gnus-decode-header-function (point-min) (point-max))))) |
17493 | 1576 |
1577 (defun article-de-quoted-unreadable (&optional force) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1578 "Translate a quoted-printable-encoded article. |
17493 | 1579 If FORCE, decode the article whether it is marked as quoted-printable |
1580 or not." | |
1581 (interactive (list 'force)) | |
1582 (save-excursion | |
31785 | 1583 (let ((buffer-read-only nil) type charset) |
1584 (if (gnus-buffer-live-p gnus-original-article-buffer) | |
1585 (with-current-buffer gnus-original-article-buffer | |
1586 (setq type | |
1587 (gnus-fetch-field "content-transfer-encoding")) | |
1588 (let* ((ct (gnus-fetch-field "content-type")) | |
1589 (ctl (and ct | |
1590 (ignore-errors | |
1591 (mail-header-parse-content-type ct))))) | |
1592 (setq charset (and ctl | |
1593 (mail-content-type-get ctl 'charset))) | |
1594 (if (stringp charset) | |
1595 (setq charset (intern (downcase charset))))))) | |
1596 (unless charset | |
1597 (setq charset gnus-newsgroup-charset)) | |
17493 | 1598 (when (or force |
32210 | 1599 (and type (let ((case-fold-search t)) |
1600 (string-match "quoted-printable" type)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1601 (article-goto-body) |
32210 | 1602 (quoted-printable-decode-region |
1603 (point) (point-max) (mm-charset-to-coding-system charset)))))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1604 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1605 (defun article-de-base64-unreadable (&optional force) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1606 "Translate a base64 article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1607 If FORCE, decode the article whether it is marked as base64 not." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1608 (interactive (list 'force)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1609 (save-excursion |
31785 | 1610 (let ((buffer-read-only nil) type charset) |
1611 (if (gnus-buffer-live-p gnus-original-article-buffer) | |
1612 (with-current-buffer gnus-original-article-buffer | |
1613 (setq type | |
1614 (gnus-fetch-field "content-transfer-encoding")) | |
1615 (let* ((ct (gnus-fetch-field "content-type")) | |
1616 (ctl (and ct | |
1617 (ignore-errors | |
1618 (mail-header-parse-content-type ct))))) | |
1619 (setq charset (and ctl | |
1620 (mail-content-type-get ctl 'charset))) | |
1621 (if (stringp charset) | |
1622 (setq charset (intern (downcase charset))))))) | |
1623 (unless charset | |
1624 (setq charset gnus-newsgroup-charset)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1625 (when (or force |
32210 | 1626 (and type (let ((case-fold-search t)) |
1627 (string-match "base64" type)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1628 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1629 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1630 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1631 (base64-decode-region (point-min) (point-max)) |
32210 | 1632 (mm-decode-coding-region |
1633 (point-min) (point-max) (mm-charset-to-coding-system charset))))))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1634 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1635 (eval-when-compile |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1636 (require 'rfc1843)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1637 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1638 (defun article-decode-HZ () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1639 "Translate a HZ-encoded article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1640 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1641 (require 'rfc1843) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1642 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1643 (let ((buffer-read-only nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1644 (rfc1843-decode-region (point-min) (point-max))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1645 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1646 (defun article-wash-html () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1647 "Format an html article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1648 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1649 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1650 (let ((buffer-read-only nil) |
31785 | 1651 charset) |
1652 (if (gnus-buffer-live-p gnus-original-article-buffer) | |
1653 (with-current-buffer gnus-original-article-buffer | |
1654 (let* ((ct (gnus-fetch-field "content-type")) | |
1655 (ctl (and ct | |
1656 (ignore-errors | |
1657 (mail-header-parse-content-type ct))))) | |
1658 (setq charset (and ctl | |
1659 (mail-content-type-get ctl 'charset))) | |
1660 (if (stringp charset) | |
1661 (setq charset (intern (downcase charset))))))) | |
1662 (unless charset | |
1663 (setq charset gnus-newsgroup-charset)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1664 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1665 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1666 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1667 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1668 (mm-setup-w3) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1669 (let ((w3-strict-width (window-width)) |
43166
aa31e3865857
* gnus-art.el (article-wash-html): Bind url-gateway-unplugged.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42475
diff
changeset
|
1670 (url-gateway-unplugged t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1671 (url-standalone-mode t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1672 (condition-case var |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1673 (w3-region (point-min) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1674 (error)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1675 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1676 (defun article-hide-list-identifiers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1677 "Remove list identifies from the Subject header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1678 The `gnus-list-identifiers' variable specifies what to do." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1679 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1680 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1681 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1682 (let ((inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1683 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1684 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1685 (let ((regexp (if (stringp gnus-list-identifiers) gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1686 (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1687 (when regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1688 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1689 (when (re-search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1690 (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1691 " *\\)\\)+\\(Re: +\\)?\\)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1692 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1693 (let ((s (or (match-string 3) (match-string 5)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1694 (delete-region (match-beginning 1) (match-end 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1695 (when s |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1696 (goto-char (match-beginning 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1697 (insert s)))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1698 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1699 (defun article-hide-pgp () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1700 "Remove any PGP headers and signatures in the current article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1701 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1702 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1703 (save-restriction |
17493 | 1704 (let ((inhibit-point-motion-hooks t) |
1705 buffer-read-only beg end) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1706 (article-goto-body) |
17493 | 1707 ;; Hide the "header". |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1708 (when (re-search-forward "^-----BEGIN PGP SIGNED MESSAGE-----\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1709 (push 'pgp gnus-article-wash-types) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1710 (delete-region (match-beginning 0) (match-end 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1711 ;; Remove armor headers (rfc2440 6.2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1712 (delete-region (point) (or (re-search-forward "^[ \t]*\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1713 (point))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1714 (setq beg (point)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1715 ;; Hide the actual signature. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1716 (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1717 (setq end (1+ (match-beginning 0))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1718 (delete-region |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1719 end |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1720 (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1721 (match-end 0) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1722 ;; Perhaps we shouldn't hide to the end of the buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1723 ;; if there is no end to the signature? |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1724 (point-max)))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1725 ;; Hide "- " PGP quotation markers. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1726 (when (and beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1727 (narrow-to-region beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1728 (goto-char (point-min)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1729 (while (re-search-forward "^- " nil t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1730 (delete-region |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1731 (match-beginning 0) (match-end 0))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1732 (widen)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1733 (gnus-run-hooks 'gnus-article-hide-pgp-hook)))))) |
17493 | 1734 |
1735 (defun article-hide-pem (&optional arg) | |
1736 "Toggle hiding of any PEM headers and signatures in the current article. | |
1737 If given a negative prefix, always show; if given a positive prefix, | |
1738 always hide." | |
1739 (interactive (gnus-article-hidden-arg)) | |
1740 (unless (gnus-article-check-hidden-text 'pem arg) | |
1741 (save-excursion | |
1742 (let (buffer-read-only end) | |
1743 (goto-char (point-min)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1744 ;; Hide the horrendously ugly "header". |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1745 (when (and (search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1746 "\n-----BEGIN PRIVACY-ENHANCED MESSAGE-----\n" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1747 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1748 (setq end (1+ (match-beginning 0)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1749 (push 'pem gnus-article-wash-types) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1750 (gnus-article-hide-text-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1751 end |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1752 (if (search-forward "\n\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1753 (match-end 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1754 (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1755 'pem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1756 ;; Hide the trailer as well |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1757 (when (search-forward "\n-----END PRIVACY-ENHANCED MESSAGE-----\n" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1758 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1759 (gnus-article-hide-text-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1760 (match-beginning 0) (match-end 0) 'pem))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1761 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1762 (defun article-strip-banner () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1763 "Strip the banner specified by the `banner' group parameter." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1764 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1765 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1766 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1767 (let ((inhibit-point-motion-hooks t) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1768 (banner (gnus-group-find-parameter gnus-newsgroup-name 'banner)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1769 (gnus-signature-limit nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1770 buffer-read-only beg end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1771 (when banner |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1772 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1773 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1774 ((eq banner 'signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1775 (when (gnus-article-narrow-to-signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1776 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1777 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1778 (delete-region (point) (point-max)))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1779 ((symbolp banner) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1780 (if (setq banner (cdr (assq banner gnus-article-banner-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1781 (while (re-search-forward banner nil t) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1782 (delete-region (match-beginning 0) (match-end 0))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1783 ((stringp banner) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1784 (while (re-search-forward banner nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1785 (delete-region (match-beginning 0) (match-end 0)))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1786 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1787 (defun article-babel () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1788 "Translate article using an online translation service." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1789 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1790 (require 'babel) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1791 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1792 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1793 (when (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1794 (let* ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1795 (start (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1796 (end (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1797 (orig (buffer-substring start end)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1798 (trans (babel-as-string orig))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1799 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1800 (narrow-to-region start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1801 (delete-region start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1802 (insert trans)))))) |
17493 | 1803 |
1804 (defun article-hide-signature (&optional arg) | |
1805 "Hide the signature in the current article. | |
1806 If given a negative prefix, always show; if given a positive prefix, | |
1807 always hide." | |
1808 (interactive (gnus-article-hidden-arg)) | |
1809 (unless (gnus-article-check-hidden-text 'signature arg) | |
1810 (save-excursion | |
1811 (save-restriction | |
1812 (let ((buffer-read-only nil)) | |
1813 (when (gnus-article-narrow-to-signature) | |
1814 (gnus-article-hide-text-type | |
1815 (point-min) (point-max) 'signature))))))) | |
1816 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1817 (defun article-strip-headers-in-body () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1818 "Strip offensive headers from bodies." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1819 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1820 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1821 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1822 (let ((case-fold-search t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1823 (when (looking-at "x-no-archive:") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1824 (gnus-delete-line))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1825 |
17493 | 1826 (defun article-strip-leading-blank-lines () |
1827 "Remove all blank lines from the beginning of the article." | |
1828 (interactive) | |
1829 (save-excursion | |
1830 (let ((inhibit-point-motion-hooks t) | |
1831 buffer-read-only) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1832 (when (article-goto-body) |
17493 | 1833 (while (and (not (eobp)) |
1834 (looking-at "[ \t]*$")) | |
1835 (gnus-delete-line)))))) | |
1836 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1837 (defun article-narrow-to-head () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1838 "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:
25382
diff
changeset
|
1839 Point is left at the beginning of the narrowed-to region." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1840 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1841 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1842 (if (search-forward "\n\n" nil 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1843 (1- (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1844 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1845 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1846 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1847 (defun article-goto-body () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1848 "Place point at the start of the body." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1849 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1850 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1851 ;; This variable is only bound when dealing with separate |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1852 ;; MIME body parts. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1853 (article-goto-body-goes-to-point-min-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1854 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1855 ((search-forward "\n\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1856 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1857 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1858 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1859 nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1860 |
17493 | 1861 (defun article-strip-multiple-blank-lines () |
1862 "Replace consecutive blank lines with one empty line." | |
1863 (interactive) | |
1864 (save-excursion | |
1865 (let ((inhibit-point-motion-hooks t) | |
1866 buffer-read-only) | |
1867 ;; First make all blank lines empty. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1868 (article-goto-body) |
17493 | 1869 (while (re-search-forward "^[ \t]+$" nil t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1870 (unless (gnus-annotation-in-region-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1871 (match-beginning 0) (match-end 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1872 (replace-match "" nil t))) |
17493 | 1873 ;; Then replace multiple empty lines with a single empty line. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1874 (article-goto-body) |
17493 | 1875 (while (re-search-forward "\n\n\n+" nil t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1876 (unless (gnus-annotation-in-region-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1877 (match-beginning 0) (match-end 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1878 (replace-match "\n\n" t t)))))) |
17493 | 1879 |
1880 (defun article-strip-leading-space () | |
1881 "Remove all white space from the beginning of the lines in the article." | |
1882 (interactive) | |
1883 (save-excursion | |
1884 (let ((inhibit-point-motion-hooks t) | |
1885 buffer-read-only) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1886 (article-goto-body) |
17493 | 1887 (while (re-search-forward "^[ \t]+" nil t) |
1888 (replace-match "" t t))))) | |
1889 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1890 (defun article-strip-trailing-space () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1891 "Remove all white space from the end of the lines in the article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1892 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1893 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1894 (let ((inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1895 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1896 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1897 (while (re-search-forward "[ \t]+$" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1898 (replace-match "" t t))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1899 |
17493 | 1900 (defun article-strip-blank-lines () |
1901 "Strip leading, trailing and multiple blank lines." | |
1902 (interactive) | |
1903 (article-strip-leading-blank-lines) | |
1904 (article-remove-trailing-blank-lines) | |
1905 (article-strip-multiple-blank-lines)) | |
1906 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1907 (defun article-strip-all-blank-lines () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1908 "Strip all blank lines." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1909 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1910 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1911 (let ((inhibit-point-motion-hooks t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1912 buffer-read-only) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1913 (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1914 (while (re-search-forward "^[ \t]*\n" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1915 (replace-match "" t t))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1916 |
17493 | 1917 (defun gnus-article-narrow-to-signature () |
1918 "Narrow to the signature; return t if a signature is found, else nil." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1919 (let ((inhibit-point-motion-hooks t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1920 (when (gnus-article-search-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1921 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1922 ;; Check whether we have some limits to what we consider |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1923 ;; to be a signature. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1924 (let ((limits (if (listp gnus-signature-limit) gnus-signature-limit |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1925 (list gnus-signature-limit))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1926 limit limited) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1927 (while (setq limit (pop limits)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1928 (if (or (and (integerp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1929 (< (- (point-max) (point)) limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1930 (and (floatp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1931 (< (count-lines (point) (point-max)) limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1932 (and (gnus-functionp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1933 (funcall limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1934 (and (stringp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1935 (not (re-search-forward limit nil t)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1936 () ; This limit did not succeed. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1937 (setq limited t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1938 limits nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1939 (unless limited |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1940 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1941 t))))) |
17493 | 1942 |
1943 (defun gnus-article-search-signature () | |
1944 "Search the current buffer for the signature separator. | |
1945 Put point at the beginning of the signature separator." | |
1946 (let ((cur (point))) | |
1947 (goto-char (point-max)) | |
1948 (if (if (stringp gnus-signature-separator) | |
1949 (re-search-backward gnus-signature-separator nil t) | |
1950 (let ((seps gnus-signature-separator)) | |
1951 (while (and seps | |
1952 (not (re-search-backward (car seps) nil t))) | |
1953 (pop seps)) | |
1954 seps)) | |
1955 t | |
1956 (goto-char cur) | |
1957 nil))) | |
1958 | |
1959 (defun gnus-article-hidden-arg () | |
1960 "Return the current prefix arg as a number, or 0 if no prefix." | |
1961 (list (if current-prefix-arg | |
1962 (prefix-numeric-value current-prefix-arg) | |
1963 0))) | |
1964 | |
1965 (defun gnus-article-check-hidden-text (type arg) | |
1966 "Return nil if hiding is necessary. | |
42206 | 1967 Arg can be nil or a number. nil and positive means hide, negative |
17493 | 1968 means show, 0 means toggle." |
1969 (save-excursion | |
1970 (save-restriction | |
1971 (let ((hide (gnus-article-hidden-text-p type))) | |
1972 (cond | |
1973 ((or (null arg) | |
1974 (> arg 0)) | |
1975 nil) | |
1976 ((< arg 0) | |
34833
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1977 (gnus-article-show-hidden-text type) |
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1978 t) |
17493 | 1979 (t |
1980 (if (eq hide 'hidden) | |
34833
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1981 (progn |
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1982 (gnus-article-show-hidden-text type) |
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1983 t) |
17493 | 1984 nil))))))) |
1985 | |
1986 (defun gnus-article-hidden-text-p (type) | |
1987 "Say whether the current buffer contains hidden text of type TYPE." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1988 (let ((pos (text-property-any (point-min) (point-max) 'article-type type))) |
17493 | 1989 (while (and pos |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1990 (not (get-text-property pos 'invisible)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1991 (not (get-text-property pos 'dummy-invisible))) |
17493 | 1992 (setq pos |
1993 (text-property-any (1+ pos) (point-max) 'article-type type))) | |
1994 (if pos | |
1995 'hidden | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1996 nil))) |
17493 | 1997 |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
1998 (defun gnus-article-show-hidden-text (type &optional dummy) |
17493 | 1999 "Show all hidden text of type TYPE. |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2000 Originally it is hide instead of DUMMY." |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2001 (let ((buffer-read-only nil) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2002 (inhibit-point-motion-hooks t)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2003 (gnus-remove-text-properties-when |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2004 'article-type type |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2005 (point-min) (point-max) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2006 (cons 'article-type (cons type |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2007 gnus-hidden-properties))))) |
17493 | 2008 |
2009 (defconst article-time-units | |
2010 `((year . ,(* 365.25 24 60 60)) | |
2011 (week . ,(* 7 24 60 60)) | |
2012 (day . ,(* 24 60 60)) | |
2013 (hour . ,(* 60 60)) | |
2014 (minute . 60) | |
2015 (second . 1)) | |
2016 "Mapping from time units to seconds.") | |
2017 | |
2018 (defun article-date-ut (&optional type highlight header) | |
2019 "Convert DATE date to universal time in the current article. | |
2020 If TYPE is `local', convert to local time; if it is `lapsed', output | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2021 how much time has lapsed since DATE. For `lapsed', the value of |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2022 `gnus-article-date-lapsed-new-header' says whether the \"X-Sent:\" header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2023 should replace the \"Date:\" one, or should be added below it." |
17493 | 2024 (interactive (list 'ut t)) |
2025 (let* ((header (or header | |
2026 (message-fetch-field "date") | |
2027 "")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2028 (tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2029 (date-regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2030 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2031 ((not gnus-article-date-lapsed-new-header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2032 tdate-regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2033 ((eq type 'lapsed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2034 "^X-Sent:[ \t]") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2035 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2036 "^Date:[ \t]"))) |
17493 | 2037 (date (if (vectorp header) (mail-header-date header) |
2038 header)) | |
2039 (inhibit-point-motion-hooks t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2040 pos |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2041 bface eface) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2042 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2043 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2044 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2045 (when (re-search-forward tdate-regexp nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2046 (setq bface (get-text-property (gnus-point-at-bol) 'face) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2047 date (or (get-text-property (gnus-point-at-bol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2048 'original-date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2049 date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2050 eface (get-text-property (1- (gnus-point-at-eol)) 'face)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2051 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2052 (when (and date (not (string= date ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2053 (goto-char (point-min)) |
17493 | 2054 (let ((buffer-read-only nil)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2055 ;; Delete any old Date headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2056 (while (re-search-forward date-regexp nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2057 (if pos |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2058 (delete-region (progn (beginning-of-line) (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2059 (progn (forward-line 1) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2060 (delete-region (progn (beginning-of-line) (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2061 (progn (end-of-line) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2062 (setq pos (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2063 (when (and (not pos) (re-search-forward tdate-regexp nil t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2064 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2065 (if pos (goto-char pos)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2066 (insert (article-make-date-line date (or type 'ut))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2067 (when (not pos) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2068 (insert "\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2069 (forward-line -1)) |
17493 | 2070 ;; Do highlighting. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2071 (beginning-of-line) |
17493 | 2072 (when (looking-at "\\([^:]+\\): *\\(.*\\)$") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2073 (put-text-property (match-beginning 1) (1+ (match-end 1)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2074 'original-date date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2075 (put-text-property (match-beginning 1) (1+ (match-end 1)) |
17493 | 2076 'face bface) |
2077 (put-text-property (match-beginning 2) (match-end 2) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2078 'face eface)))))))) |
17493 | 2079 |
2080 (defun article-make-date-line (date type) | |
2081 "Return a DATE line of TYPE." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2082 (let ((time (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2083 (date-to-time date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2084 (error '(0 0))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2085 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2086 ;; Convert to the local timezone. We have to slap a |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2087 ;; `condition-case' round the calls to the timezone |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2088 ;; functions since they aren't particularly resistant to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2089 ;; buggy dates. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2090 ((eq type 'local) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2091 (let ((tz (car (current-time-zone time)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2092 (format "Date: %s %s%02d%02d" (current-time-string time) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2093 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2094 (/ (% (abs tz) 3600) 60)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2095 ;; Convert to Universal Time. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2096 ((eq type 'ut) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2097 (concat "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2098 (current-time-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2099 (let* ((e (parse-time-string date)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2100 (tm (apply 'encode-time e)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2101 (ms (car tm)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2102 (ls (- (cadr tm) (car (current-time-zone time))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2103 (cond ((< ls 0) (list (1- ms) (+ ls 65536))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2104 ((> ls 65535) (list (1+ ms) (- ls 65536))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2105 (t (list ms ls))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2106 " UT")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2107 ;; Get the original date from the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2108 ((eq type 'original) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2109 (concat "Date: " (if (string-match "\n+$" date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2110 (substring date 0 (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2111 date))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2112 ;; Let the user define the format. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2113 ((eq type 'user) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2114 (if (gnus-functionp gnus-article-time-format) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2115 (funcall gnus-article-time-format time) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2116 (concat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2117 "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2118 (format-time-string gnus-article-time-format time)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2119 ;; ISO 8601. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2120 ((eq type 'iso8601) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2121 (let ((tz (car (current-time-zone time)))) |
17493 | 2122 (concat |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2123 "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2124 (format-time-string "%Y%m%dT%H%M%S" time) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2125 (format "%s%02d%02d" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2126 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2127 (/ (% (abs tz) 3600) 60))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2128 ;; Do an X-Sent lapsed format. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2129 ((eq type 'lapsed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2130 ;; If the date is seriously mangled, the timezone functions are |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2131 ;; liable to bug out, so we ignore all errors. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2132 (let* ((now (current-time)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2133 (real-time (subtract-time now time)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2134 (real-sec (and real-time |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2135 (+ (* (float (car real-time)) 65536) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2136 (cadr real-time)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2137 (sec (and real-time (abs real-sec))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2138 num prev) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2139 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2140 ((null real-time) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2141 "X-Sent: Unknown") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2142 ((zerop sec) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2143 "X-Sent: Now") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2144 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2145 (concat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2146 "X-Sent: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2147 ;; This is a bit convoluted, but basically we go |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2148 ;; through the time units for years, weeks, etc, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2149 ;; and divide things to see whether that results |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2150 ;; in positive answers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2151 (mapconcat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2152 (lambda (unit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2153 (if (zerop (setq num (ffloor (/ sec (cdr unit))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2154 ;; The (remaining) seconds are too few to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2155 ;; be divided into this time unit. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2156 "" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2157 ;; It's big enough, so we output it. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2158 (setq sec (- sec (* num (cdr unit)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2159 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2160 (concat (if prev ", " "") (int-to-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2161 (floor num)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2162 " " (symbol-name (car unit)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2163 (if (> num 1) "s" "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2164 (setq prev t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2165 article-time-units "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2166 ;; If dates are odd, then it might appear like the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2167 ;; article was sent in the future. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2168 (if (> real-sec 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2169 " ago" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2170 " in the future")))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2171 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2172 (error "Unknown conversion type: %s" type))))) |
17493 | 2173 |
2174 (defun article-date-local (&optional highlight) | |
2175 "Convert the current article date to the local timezone." | |
2176 (interactive (list t)) | |
2177 (article-date-ut 'local highlight)) | |
2178 | |
2179 (defun article-date-original (&optional highlight) | |
2180 "Convert the current article date to what it was originally. | |
2181 This is only useful if you have used some other date conversion | |
2182 function and want to see what the date was before converting." | |
2183 (interactive (list t)) | |
2184 (article-date-ut 'original highlight)) | |
2185 | |
2186 (defun article-date-lapsed (&optional highlight) | |
2187 "Convert the current article date to time lapsed since it was sent." | |
2188 (interactive (list t)) | |
2189 (article-date-ut 'lapsed highlight)) | |
2190 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2191 (defun article-update-date-lapsed () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2192 "Function to be run from a timer to update the lapsed time line." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2193 (let (deactivate-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2194 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2195 (ignore-errors |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2196 (walk-windows |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2197 (lambda (w) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2198 (set-buffer (window-buffer w)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2199 (when (eq major-mode 'gnus-article-mode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2200 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2201 (when (re-search-forward "^X-Sent:" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2202 (article-date-lapsed t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2203 nil 'visible))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2204 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2205 (defun gnus-start-date-timer (&optional n) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2206 "Start a timer to update the X-Sent header in the article buffers. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2207 The numerical prefix says how frequently (in seconds) the function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2208 is to run." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2209 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2210 (unless n |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2211 (setq n 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2212 (gnus-stop-date-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2213 (setq article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2214 (nnheader-run-at-time 1 n 'article-update-date-lapsed))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2215 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2216 (defun gnus-stop-date-timer () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2217 "Stop the X-Sent timer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2218 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2219 (when article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2220 (nnheader-cancel-timer article-lapsed-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2221 (setq article-lapsed-timer nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2222 |
17493 | 2223 (defun article-date-user (&optional highlight) |
2224 "Convert the current article date to the user-defined format. | |
2225 This format is defined by the `gnus-article-time-format' variable." | |
2226 (interactive (list t)) | |
2227 (article-date-ut 'user highlight)) | |
2228 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2229 (defun article-date-iso8601 (&optional highlight) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2230 "Convert the current article date to ISO8601." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2231 (interactive (list t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2232 (article-date-ut 'iso8601 highlight)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2233 |
17493 | 2234 (defun article-show-all () |
2235 "Show all hidden text in the article buffer." | |
2236 (interactive) | |
2237 (save-excursion | |
2238 (let ((buffer-read-only nil)) | |
2239 (gnus-article-unhide-text (point-min) (point-max))))) | |
2240 | |
2241 (defun article-emphasize (&optional arg) | |
2242 "Emphasize text according to `gnus-emphasis-alist'." | |
2243 (interactive (gnus-article-hidden-arg)) | |
2244 (unless (gnus-article-check-hidden-text 'emphasis arg) | |
2245 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2246 (let ((alist (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2247 (condition-case nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2248 (with-current-buffer gnus-summary-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2249 gnus-article-emphasis-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2250 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2251 gnus-emphasis-alist)) |
17493 | 2252 (buffer-read-only nil) |
2253 (props (append '(article-type emphasis) | |
2254 gnus-hidden-properties)) | |
2255 regexp elem beg invisible visible face) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2256 (article-goto-body) |
17493 | 2257 (setq beg (point)) |
2258 (while (setq elem (pop alist)) | |
2259 (goto-char beg) | |
2260 (setq regexp (car elem) | |
2261 invisible (nth 1 elem) | |
2262 visible (nth 2 elem) | |
2263 face (nth 3 elem)) | |
2264 (while (re-search-forward regexp nil t) | |
2265 (when (and (match-beginning visible) (match-beginning invisible)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2266 (push 'emphasis gnus-article-wash-types) |
17493 | 2267 (gnus-article-hide-text |
2268 (match-beginning invisible) (match-end invisible) props) | |
2269 (gnus-article-unhide-text-type | |
2270 (match-beginning visible) (match-end visible) 'emphasis) | |
2271 (gnus-put-text-property-excluding-newlines | |
2272 (match-beginning visible) (match-end visible) 'face face) | |
2273 (goto-char (match-end invisible))))))))) | |
2274 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2275 (defun gnus-article-setup-highlight-words (&optional highlight-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2276 "Setup newsgroup emphasis alist." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2277 (unless gnus-article-emphasis-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2278 (let ((name (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2279 (gnus-group-real-name gnus-newsgroup-name)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2280 (make-local-variable 'gnus-article-emphasis-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2281 (setq gnus-article-emphasis-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2282 (nconc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2283 (let ((alist gnus-group-highlight-words-alist) elem highlight) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2284 (while (setq elem (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2285 (when (and name (string-match (car elem) name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2286 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2287 highlight (copy-sequence (cdr elem))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2288 highlight) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2289 (copy-sequence highlight-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2290 (if gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2291 (copy-sequence (gnus-group-find-parameter |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2292 gnus-newsgroup-name 'highlight-words t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2293 gnus-emphasis-alist))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2294 |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2295 (eval-when-compile |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2296 (defvar gnus-summary-article-menu) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2297 (defvar gnus-summary-post-menu)) |
17493 | 2298 |
2299 ;;; Saving functions. | |
2300 | |
2301 (defun gnus-article-save (save-buffer file &optional num) | |
2302 "Save the currently selected article." | |
2303 (unless gnus-save-all-headers | |
2304 ;; Remove headers according to `gnus-saved-headers'. | |
2305 (let ((gnus-visible-headers | |
2306 (or gnus-saved-headers gnus-visible-headers)) | |
2307 (gnus-article-buffer save-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2308 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2309 (set-buffer save-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2310 (article-hide-headers 1 t)))) |
17493 | 2311 (save-window-excursion |
2312 (if (not gnus-default-article-saver) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2313 (error "No default saver is defined") |
17493 | 2314 ;; !!! Magic! The saving functions all save |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2315 ;; `gnus-save-article-buffer' (or so they think), but we |
17493 | 2316 ;; bind that variable to our save-buffer. |
2317 (set-buffer gnus-article-buffer) | |
2318 (let* ((gnus-save-article-buffer save-buffer) | |
2319 (filename | |
2320 (cond | |
2321 ((not gnus-prompt-before-saving) 'default) | |
2322 ((eq gnus-prompt-before-saving 'always) nil) | |
2323 (t file))) | |
2324 (gnus-number-of-articles-to-be-saved | |
2325 (when (eq gnus-prompt-before-saving t) | |
2326 num))) ; Magic | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2327 (set-buffer gnus-article-current-summary) |
17493 | 2328 (funcall gnus-default-article-saver filename))))) |
2329 | |
2330 (defun gnus-read-save-file-name (prompt &optional filename | |
2331 function group headers variable) | |
2332 (let ((default-name | |
2333 (funcall function group headers (symbol-value variable))) | |
2334 result) | |
33077 | 2335 (setq result |
2336 (expand-file-name | |
2337 (cond | |
2338 ((eq filename 'default) | |
2339 default-name) | |
2340 ((eq filename t) | |
2341 default-name) | |
2342 (filename filename) | |
2343 (t | |
2344 (let* ((split-name (gnus-get-split-value gnus-split-methods)) | |
2345 (prompt | |
2346 (format prompt | |
2347 (if (and gnus-number-of-articles-to-be-saved | |
2348 (> gnus-number-of-articles-to-be-saved 1)) | |
2349 (format "these %d articles" | |
2350 gnus-number-of-articles-to-be-saved) | |
2351 "this article"))) | |
2352 (file | |
2353 ;; Let the split methods have their say. | |
2354 (cond | |
2355 ;; No split name was found. | |
2356 ((null split-name) | |
2357 (read-file-name | |
2358 (concat prompt " (default " | |
2359 (file-name-nondirectory default-name) ") ") | |
2360 (file-name-directory default-name) | |
2361 default-name)) | |
2362 ;; A single group name is returned. | |
2363 ((stringp split-name) | |
2364 (setq default-name | |
2365 (funcall function split-name headers | |
2366 (symbol-value variable))) | |
2367 (read-file-name | |
2368 (concat prompt " (default " | |
2369 (file-name-nondirectory default-name) ") ") | |
2370 (file-name-directory default-name) | |
2371 default-name)) | |
2372 ;; A single split name was found | |
2373 ((= 1 (length split-name)) | |
2374 (let* ((name (expand-file-name | |
2375 (car split-name) gnus-article-save-directory)) | |
2376 (dir (cond ((file-directory-p name) | |
2377 (file-name-as-directory name)) | |
2378 ((file-exists-p name) name) | |
2379 (t gnus-article-save-directory)))) | |
2380 (read-file-name | |
2381 (concat prompt " (default " name ") ") | |
2382 dir name))) | |
2383 ;; A list of splits was found. | |
2384 (t | |
2385 (setq split-name (nreverse split-name)) | |
2386 (let (result) | |
2387 (let ((file-name-history | |
2388 (nconc split-name file-name-history))) | |
2389 (setq result | |
2390 (expand-file-name | |
2391 (read-file-name | |
2392 (concat prompt " (`M-p' for defaults) ") | |
2393 gnus-article-save-directory | |
2394 (car split-name)) | |
2395 gnus-article-save-directory))) | |
2396 (car (push result file-name-history))))))) | |
2397 ;; Create the directory. | |
2398 (gnus-make-directory (file-name-directory file)) | |
2399 ;; If we have read a directory, we append the default file name. | |
2400 (when (file-directory-p file) | |
2401 (setq file (expand-file-name (file-name-nondirectory default-name) | |
2402 (file-name-as-directory file)))) | |
2403 ;; Possibly translate some characters. | |
2404 (nnheader-translate-file-chars file)))))) | |
17493 | 2405 (gnus-make-directory (file-name-directory result)) |
2406 (set variable result))) | |
2407 | |
2408 (defun gnus-article-archive-name (group) | |
2409 "Return the first instance of an \"Archive-name\" in the current buffer." | |
2410 (let ((case-fold-search t)) | |
2411 (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) | |
2412 (nnheader-concat gnus-article-save-directory | |
2413 (match-string 1))))) | |
2414 | |
2415 (defun gnus-article-nndoc-name (group) | |
2416 "If GROUP is an nndoc group, return the name of the parent group." | |
2417 (when (eq (car (gnus-find-method-for-group group)) 'nndoc) | |
2418 (gnus-group-get-parameter group 'save-article-group))) | |
2419 | |
2420 (defun gnus-summary-save-in-rmail (&optional filename) | |
2421 "Append this article to Rmail file. | |
2422 Optional argument FILENAME specifies file name. | |
2423 Directory to save to is default to `gnus-article-save-directory'." | |
2424 (setq filename (gnus-read-save-file-name | |
2425 "Save %s in rmail file:" filename | |
2426 gnus-rmail-save-name gnus-newsgroup-name | |
2427 gnus-current-headers 'gnus-newsgroup-last-rmail)) | |
2428 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2429 (save-excursion | |
2430 (save-restriction | |
2431 (widen) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2432 (gnus-output-to-rmail filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2433 filename) |
17493 | 2434 |
2435 (defun gnus-summary-save-in-mail (&optional filename) | |
2436 "Append this article to Unix mail file. | |
2437 Optional argument FILENAME specifies file name. | |
2438 Directory to save to is default to `gnus-article-save-directory'." | |
2439 (setq filename (gnus-read-save-file-name | |
2440 "Save %s in Unix mail file:" filename | |
2441 gnus-mail-save-name gnus-newsgroup-name | |
2442 gnus-current-headers 'gnus-newsgroup-last-mail)) | |
2443 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2444 (save-excursion | |
2445 (save-restriction | |
2446 (widen) | |
2447 (if (and (file-readable-p filename) | |
2448 (mail-file-babyl-p filename)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2449 (rmail-output-to-rmail-file filename t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2450 (gnus-output-to-mail filename))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2451 filename) |
17493 | 2452 |
2453 (defun gnus-summary-save-in-file (&optional filename overwrite) | |
2454 "Append this article to file. | |
2455 Optional argument FILENAME specifies file name. | |
2456 Directory to save to is default to `gnus-article-save-directory'." | |
2457 (setq filename (gnus-read-save-file-name | |
2458 "Save %s in file:" filename | |
2459 gnus-file-save-name gnus-newsgroup-name | |
2460 gnus-current-headers 'gnus-newsgroup-last-file)) | |
2461 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2462 (save-excursion | |
2463 (save-restriction | |
2464 (widen) | |
2465 (when (and overwrite | |
2466 (file-exists-p filename)) | |
2467 (delete-file filename)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2468 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2469 filename) |
17493 | 2470 |
2471 (defun gnus-summary-write-to-file (&optional filename) | |
2472 "Write this article to a file. | |
2473 Optional argument FILENAME specifies file name. | |
2474 The directory to save in defaults to `gnus-article-save-directory'." | |
2475 (gnus-summary-save-in-file nil t)) | |
2476 | |
2477 (defun gnus-summary-save-body-in-file (&optional filename) | |
2478 "Append this article body to a file. | |
2479 Optional argument FILENAME specifies file name. | |
2480 The directory to save in defaults to `gnus-article-save-directory'." | |
2481 (setq filename (gnus-read-save-file-name | |
2482 "Save %s body in file:" filename | |
2483 gnus-file-save-name gnus-newsgroup-name | |
2484 gnus-current-headers 'gnus-newsgroup-last-file)) | |
2485 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2486 (save-excursion | |
2487 (save-restriction | |
2488 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2489 (when (article-goto-body) |
17493 | 2490 (narrow-to-region (point) (point-max))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2491 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2492 filename) |
17493 | 2493 |
2494 (defun gnus-summary-save-in-pipe (&optional command) | |
2495 "Pipe this article to subprocess." | |
2496 (setq command | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2497 (cond ((and (eq command 'default) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2498 gnus-last-shell-command) |
17493 | 2499 gnus-last-shell-command) |
35838
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
2500 ((stringp command) |
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
2501 command) |
17493 | 2502 (t (read-string |
2503 (format | |
2504 "Shell command on %s: " | |
2505 (if (and gnus-number-of-articles-to-be-saved | |
2506 (> gnus-number-of-articles-to-be-saved 1)) | |
2507 (format "these %d articles" | |
2508 gnus-number-of-articles-to-be-saved) | |
2509 "this article")) | |
2510 gnus-last-shell-command)))) | |
2511 (when (string-equal command "") | |
35838
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
2512 (if gnus-last-shell-command |
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
2513 (setq command gnus-last-shell-command) |
38413
a26d9b55abb6
Some fixes to follow coding conventions in files from Gnus.
Pavel Janík <Pavel@Janik.cz>
parents:
35957
diff
changeset
|
2514 (error "A command is required"))) |
17493 | 2515 (gnus-eval-in-buffer-window gnus-article-buffer |
2516 (save-restriction | |
2517 (widen) | |
2518 (shell-command-on-region (point-min) (point-max) command nil))) | |
2519 (setq gnus-last-shell-command command)) | |
2520 | |
2521 ;;; Article file names when saving. | |
2522 | |
2523 (defun gnus-capitalize-newsgroup (newsgroup) | |
2524 "Capitalize NEWSGROUP name." | |
2525 (when (not (zerop (length newsgroup))) | |
2526 (concat (char-to-string (upcase (aref newsgroup 0))) | |
2527 (substring newsgroup 1)))) | |
2528 | |
2529 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) | |
2530 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2531 If variable `gnus-use-long-file-name' is non-nil, it is ~/News/News.group/num. | |
2532 Otherwise, it is like ~/News/news/group/num." | |
2533 (let ((default | |
2534 (expand-file-name | |
2535 (concat (if (gnus-use-long-file-name 'not-save) | |
2536 (gnus-capitalize-newsgroup newsgroup) | |
2537 (gnus-newsgroup-directory-form newsgroup)) | |
2538 "/" (int-to-string (mail-header-number headers))) | |
2539 gnus-article-save-directory))) | |
2540 (if (and last-file | |
2541 (string-equal (file-name-directory default) | |
2542 (file-name-directory last-file)) | |
2543 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
2544 default | |
2545 (or last-file default)))) | |
2546 | |
2547 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
2548 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2549 If variable `gnus-use-long-file-name' is non-nil, it is | |
2550 ~/News/news.group/num. Otherwise, it is like ~/News/news/group/num." | |
2551 (let ((default | |
2552 (expand-file-name | |
2553 (concat (if (gnus-use-long-file-name 'not-save) | |
2554 newsgroup | |
2555 (gnus-newsgroup-directory-form newsgroup)) | |
2556 "/" (int-to-string (mail-header-number headers))) | |
2557 gnus-article-save-directory))) | |
2558 (if (and last-file | |
2559 (string-equal (file-name-directory default) | |
2560 (file-name-directory last-file)) | |
2561 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
2562 default | |
2563 (or last-file default)))) | |
2564 | |
2565 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
2566 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2567 If variable `gnus-use-long-file-name' is non-nil, it is | |
2568 ~/News/news.group. Otherwise, it is like ~/News/news/group/news." | |
2569 (or last-file | |
2570 (expand-file-name | |
2571 (if (gnus-use-long-file-name 'not-save) | |
2572 newsgroup | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2573 (expand-file-name "news" (gnus-newsgroup-directory-form newsgroup))) |
17493 | 2574 gnus-article-save-directory))) |
2575 | |
2576 (eval-and-compile | |
2577 (mapcar | |
2578 (lambda (func) | |
2579 (let (afunc gfunc) | |
2580 (if (consp func) | |
2581 (setq afunc (car func) | |
2582 gfunc (cdr func)) | |
2583 (setq afunc func | |
2584 gfunc (intern (format "gnus-%s" func)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2585 (defalias gfunc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2586 (if (fboundp afunc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2587 `(lambda (&optional interactive &rest args) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2588 ,(documentation afunc t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2589 (interactive (list t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2590 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2591 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2592 (if interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2593 (call-interactively ',afunc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2594 (apply ',afunc args)))))))) |
17493 | 2595 '(article-hide-headers |
2596 article-hide-boring-headers | |
2597 article-treat-overstrike | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2598 article-fill-long-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2599 article-capitalize-sentences |
17493 | 2600 article-remove-cr |
2601 article-display-x-face | |
2602 article-de-quoted-unreadable | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2603 article-de-base64-unreadable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2604 article-decode-HZ |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2605 article-wash-html |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2606 article-hide-list-identifiers |
17493 | 2607 article-hide-pgp |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2608 article-strip-banner |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2609 article-babel |
17493 | 2610 article-hide-pem |
2611 article-hide-signature | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2612 article-strip-headers-in-body |
17493 | 2613 article-remove-trailing-blank-lines |
2614 article-strip-leading-blank-lines | |
2615 article-strip-multiple-blank-lines | |
2616 article-strip-leading-space | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2617 article-strip-trailing-space |
17493 | 2618 article-strip-blank-lines |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2619 article-strip-all-blank-lines |
17493 | 2620 article-date-local |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2621 article-date-iso8601 |
17493 | 2622 article-date-original |
2623 article-date-ut | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2624 article-decode-mime-words |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2625 article-decode-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2626 article-decode-encoded-words |
17493 | 2627 article-date-user |
2628 article-date-lapsed | |
2629 article-emphasize | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2630 article-treat-dumbquotes |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2631 article-normalize-headers |
17493 | 2632 (article-show-all . gnus-article-show-all-headers)))) |
2633 | |
2634 ;;; | |
2635 ;;; Gnus article mode | |
2636 ;;; | |
2637 | |
2638 (put 'gnus-article-mode 'mode-class 'special) | |
2639 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2640 (set-keymap-parent gnus-article-mode-map widget-keymap) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2641 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2642 (gnus-define-keys gnus-article-mode-map |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2643 " " gnus-article-goto-next-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2644 "\177" gnus-article-goto-prev-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2645 [delete] gnus-article-goto-prev-page |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2646 [backspace] gnus-article-goto-prev-page |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2647 "\C-c^" gnus-article-refer-article |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2648 "h" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2649 "s" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2650 "\C-c\C-m" gnus-article-mail |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2651 "?" gnus-article-describe-briefly |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2652 "e" gnus-summary-edit-article |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2653 "<" beginning-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2654 ">" end-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2655 "\C-c\C-i" gnus-info-find-node |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2656 "\C-c\C-b" gnus-bug |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2657 "\C-hk" gnus-article-describe-key |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2658 "\C-hc" gnus-article-describe-key-briefly |
17493 | 2659 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2660 "\C-d" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2661 "\M-*" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2662 "\M-#" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2663 "\M-^" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2664 "\M-g" gnus-article-read-summary-keys) |
17493 | 2665 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2666 (substitute-key-definition |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2667 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) |
17493 | 2668 |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2669 (defvar gnus-article-post-menu nil) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2670 |
17493 | 2671 (defun gnus-article-make-menu-bar () |
2672 (gnus-turn-off-edit-menu 'article) | |
2673 (unless (boundp 'gnus-article-article-menu) | |
2674 (easy-menu-define | |
2675 gnus-article-article-menu gnus-article-mode-map "" | |
2676 '("Article" | |
2677 ["Scroll forwards" gnus-article-goto-next-page t] | |
2678 ["Scroll backwards" gnus-article-goto-prev-page t] | |
2679 ["Show summary" gnus-article-show-summary t] | |
2680 ["Fetch Message-ID at point" gnus-article-refer-article t] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2681 ["Mail to address at point" gnus-article-mail t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2682 ["Send a bug report" gnus-bug t])) |
17493 | 2683 |
2684 (easy-menu-define | |
2685 gnus-article-treatment-menu gnus-article-mode-map "" | |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2686 ;; Fixme: this should use :active (and maybe :visible). |
17493 | 2687 '("Treatment" |
2688 ["Hide headers" gnus-article-hide-headers t] | |
2689 ["Hide signature" gnus-article-hide-signature t] | |
2690 ["Hide citation" gnus-article-hide-citation t] | |
2691 ["Treat overstrike" gnus-article-treat-overstrike t] | |
2692 ["Remove carriage return" gnus-article-remove-cr t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2693 ["Remove quoted-unreadable" gnus-article-de-quoted-unreadable t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2694 ["Remove base64" gnus-article-de-base64-unreadable t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2695 ["Treat html" gnus-article-wash-html t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2696 ["Decode HZ" gnus-article-decode-HZ t])) |
17493 | 2697 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2698 ;; Note "Commands" menu is defined in gnus-sum.el for consistency |
17493 | 2699 |
2700 (when (boundp 'gnus-summary-post-menu) | |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2701 (cond |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2702 ((not (keymapp gnus-summary-post-menu)) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2703 (setq gnus-article-post-menu gnus-summary-post-menu)) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2704 ((not gnus-article-post-menu) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2705 ;; Don't share post menu. |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2706 (setq gnus-article-post-menu |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2707 (copy-keymap gnus-summary-post-menu)))) |
17493 | 2708 (define-key gnus-article-mode-map [menu-bar post] |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2709 (cons "Post" gnus-article-post-menu))) |
17493 | 2710 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2711 (gnus-run-hooks 'gnus-article-menu-hook))) |
17493 | 2712 |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2713 ;; Fixme: do something for the Emacs tool bar in Article mode a la |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2714 ;; Summary. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2715 |
17493 | 2716 (defun gnus-article-mode () |
2717 "Major mode for displaying an article. | |
2718 | |
2719 All normal editing commands are switched off. | |
2720 | |
2721 The following commands are available in addition to all summary mode | |
2722 commands: | |
2723 \\<gnus-article-mode-map> | |
2724 \\[gnus-article-next-page]\t Scroll the article one page forwards | |
2725 \\[gnus-article-prev-page]\t Scroll the article one page backwards | |
2726 \\[gnus-article-refer-article]\t Go to the article referred to by an article id near point | |
2727 \\[gnus-article-show-summary]\t Display the summary buffer | |
2728 \\[gnus-article-mail]\t Send a reply to the address near point | |
2729 \\[gnus-article-describe-briefly]\t Describe the current mode briefly | |
2730 \\[gnus-info-find-node]\t Go to the Gnus info node" | |
2731 (interactive) | |
2732 (gnus-simplify-mode-line) | |
2733 (setq mode-name "Article") | |
2734 (setq major-mode 'gnus-article-mode) | |
2735 (make-local-variable 'minor-mode-alist) | |
2736 (use-local-map gnus-article-mode-map) | |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2737 (when (gnus-visual-p 'article-menu 'menu) |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2738 (gnus-article-make-menu-bar)) |
17493 | 2739 (gnus-update-format-specifications nil 'article-mode) |
2740 (set (make-local-variable 'page-delimiter) gnus-page-delimiter) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2741 (make-local-variable 'gnus-page-broken) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2742 (make-local-variable 'gnus-button-marker-list) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2743 (make-local-variable 'gnus-article-current-summary) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2744 (make-local-variable 'gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2745 (make-local-variable 'gnus-article-decoded-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2746 (make-local-variable 'gnus-article-mime-handle-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2747 (make-local-variable 'gnus-article-wash-types) |
17493 | 2748 (gnus-set-default-directory) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2749 (buffer-disable-undo) |
17493 | 2750 (setq buffer-read-only t) |
2751 (set-syntax-table gnus-article-mode-syntax-table) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2752 (mm-enable-multibyte) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2753 (gnus-run-hooks 'gnus-article-mode-hook)) |
17493 | 2754 |
2755 (defun gnus-article-setup-buffer () | |
2756 "Initialize the article buffer." | |
2757 (let* ((name (if gnus-single-article-buffer "*Article*" | |
2758 (concat "*Article " gnus-newsgroup-name "*"))) | |
2759 (original | |
2760 (progn (string-match "\\*Article" name) | |
2761 (concat " *Original Article" | |
2762 (substring name (match-end 0)))))) | |
2763 (setq gnus-article-buffer name) | |
2764 (setq gnus-original-article-buffer original) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2765 (setq gnus-article-mime-handle-alist nil) |
17493 | 2766 ;; This might be a variable local to the summary buffer. |
2767 (unless gnus-single-article-buffer | |
2768 (save-excursion | |
2769 (set-buffer gnus-summary-buffer) | |
2770 (setq gnus-article-buffer name) | |
2771 (setq gnus-original-article-buffer original) | |
2772 (gnus-set-global-variables))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2773 (gnus-article-setup-highlight-words) |
17493 | 2774 ;; Init original article buffer. |
2775 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2776 (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2777 (mm-enable-multibyte) |
17493 | 2778 (setq major-mode 'gnus-original-article-mode) |
2779 (make-local-variable 'gnus-original-article)) | |
2780 (if (get-buffer name) | |
2781 (save-excursion | |
2782 (set-buffer name) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2783 (when gnus-article-mime-handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2784 (mm-destroy-parts gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2785 (setq gnus-article-mime-handles nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2786 ;; Set it to nil in article-buffer! |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2787 (setq gnus-article-mime-handle-alist nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2788 (buffer-disable-undo) |
17493 | 2789 (setq buffer-read-only t) |
2790 (unless (eq major-mode 'gnus-article-mode) | |
2791 (gnus-article-mode)) | |
2792 (current-buffer)) | |
2793 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2794 (set-buffer (gnus-get-buffer-create name)) |
17493 | 2795 (gnus-article-mode) |
2796 (make-local-variable 'gnus-summary-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2797 (gnus-summary-set-local-parameters gnus-newsgroup-name) |
17493 | 2798 (current-buffer))))) |
2799 | |
2800 ;; Set article window start at LINE, where LINE is the number of lines | |
2801 ;; from the head of the article. | |
2802 (defun gnus-article-set-window-start (&optional line) | |
2803 (set-window-start | |
2804 (get-buffer-window gnus-article-buffer t) | |
2805 (save-excursion | |
2806 (set-buffer gnus-article-buffer) | |
2807 (goto-char (point-min)) | |
2808 (if (not line) | |
2809 (point-min) | |
2810 (gnus-message 6 "Moved to bookmark") | |
2811 (search-forward "\n\n" nil t) | |
2812 (forward-line line) | |
2813 (point))))) | |
2814 | |
2815 (defun gnus-article-prepare (article &optional all-headers header) | |
2816 "Prepare ARTICLE in article mode buffer. | |
2817 ARTICLE should either be an article number or a Message-ID. | |
2818 If ARTICLE is an id, HEADER should be the article headers. | |
2819 If ALL-HEADERS is non-nil, no headers are hidden." | |
2820 (save-excursion | |
2821 ;; Make sure we start in a summary buffer. | |
2822 (unless (eq major-mode 'gnus-summary-mode) | |
2823 (set-buffer gnus-summary-buffer)) | |
2824 (setq gnus-summary-buffer (current-buffer)) | |
2825 (let* ((gnus-article (if header (mail-header-number header) article)) | |
2826 (summary-buffer (current-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2827 (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) |
17493 | 2828 (group gnus-newsgroup-name) |
2829 result) | |
2830 (save-excursion | |
2831 (gnus-article-setup-buffer) | |
2832 (set-buffer gnus-article-buffer) | |
2833 ;; Deactivate active regions. | |
2834 (when (and (boundp 'transient-mark-mode) | |
2835 transient-mark-mode) | |
2836 (setq mark-active nil)) | |
2837 (if (not (setq result (let ((buffer-read-only nil)) | |
2838 (gnus-request-article-this-buffer | |
2839 article group)))) | |
2840 ;; There is no such article. | |
2841 (save-excursion | |
2842 (when (and (numberp article) | |
2843 (not (memq article gnus-newsgroup-sparse))) | |
2844 (setq gnus-article-current | |
2845 (cons gnus-newsgroup-name article)) | |
2846 (set-buffer gnus-summary-buffer) | |
2847 (setq gnus-current-article article) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2848 (if (eq (gnus-article-mark article) gnus-undownloaded-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2849 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2850 (gnus-summary-set-agent-mark article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2851 (message "Message marked for downloading")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2852 (gnus-summary-mark-article article gnus-canceled-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2853 (unless (memq article gnus-newsgroup-sparse) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2854 (gnus-error 1 "No such article (may have expired or been canceled)"))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2855 (if (or (eq result 'pseudo) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2856 (eq result 'nneething)) |
17493 | 2857 (progn |
2858 (save-excursion | |
2859 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2860 (push article gnus-newsgroup-history) |
17493 | 2861 (setq gnus-last-article gnus-current-article |
2862 gnus-current-article 0 | |
2863 gnus-current-headers nil | |
2864 gnus-article-current nil) | |
2865 (if (eq result 'nneething) | |
2866 (gnus-configure-windows 'summary) | |
2867 (gnus-configure-windows 'article)) | |
2868 (gnus-set-global-variables)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2869 (let ((gnus-article-mime-handle-alist-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2870 gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2871 (gnus-set-mode-line 'article))) |
17493 | 2872 ;; The result from the `request' was an actual article - |
2873 ;; or at least some text that is now displayed in the | |
2874 ;; article buffer. | |
2875 (when (and (numberp article) | |
2876 (not (eq article gnus-current-article))) | |
2877 ;; Seems like a new article has been selected. | |
2878 ;; `gnus-current-article' must be an article number. | |
2879 (save-excursion | |
2880 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2881 (push article gnus-newsgroup-history) |
17493 | 2882 (setq gnus-last-article gnus-current-article |
2883 gnus-current-article article | |
2884 gnus-current-headers | |
2885 (gnus-summary-article-header gnus-current-article) | |
2886 gnus-article-current | |
2887 (cons gnus-newsgroup-name gnus-current-article)) | |
2888 (unless (vectorp gnus-current-headers) | |
2889 (setq gnus-current-headers nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2890 (gnus-summary-goto-subject gnus-current-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2891 (when (gnus-summary-show-thread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2892 ;; If the summary buffer really was folded, the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2893 ;; previous goto may not actually have gone to |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2894 ;; the right article, but the thread root instead. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2895 ;; So we go again. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2896 (gnus-summary-goto-subject gnus-current-article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2897 (gnus-run-hooks 'gnus-mark-article-hook) |
17493 | 2898 (gnus-set-mode-line 'summary) |
2899 (when (gnus-visual-p 'article-highlight 'highlight) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2900 (gnus-run-hooks 'gnus-visual-mark-article-hook)) |
17493 | 2901 ;; Set the global newsgroup variables here. |
2902 (gnus-set-global-variables) | |
2903 (setq gnus-have-all-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2904 (or all-headers gnus-show-all-headers)))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
2905 (save-excursion |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
2906 (gnus-configure-windows 'article)) |
17493 | 2907 (when (or (numberp article) |
2908 (stringp article)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2909 (gnus-article-prepare-display) |
17493 | 2910 ;; Do page break. |
2911 (goto-char (point-min)) | |
2912 (setq gnus-page-broken | |
2913 (when gnus-break-pages | |
2914 (gnus-narrow-to-page) | |
2915 t))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2916 (let ((gnus-article-mime-handle-alist-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2917 gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2918 (gnus-set-mode-line 'article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2919 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2920 (set-window-point (get-buffer-window (current-buffer)) (point)) |
17493 | 2921 (gnus-configure-windows 'article) |
2922 t)))))) | |
2923 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2924 ;;;###autoload |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2925 (defun gnus-article-prepare-display () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2926 "Make the current buffer look like a nice article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2927 ;; Hooks for getting information from the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2928 ;; This hook must be called before being narrowed. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2929 (let ((gnus-article-buffer (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2930 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2931 (unless (eq major-mode 'gnus-article-mode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2932 (gnus-article-mode)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2933 (setq buffer-read-only nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2934 gnus-article-wash-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2935 (gnus-run-hooks 'gnus-tmp-internal-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2936 (when gnus-display-mime-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2937 (funcall gnus-display-mime-function)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2938 (gnus-run-hooks 'gnus-article-prepare-hook))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2939 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2940 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2941 ;;; Gnus MIME viewing functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2942 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2943 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2944 (defvar gnus-mime-button-line-format "%{%([%p. %d%T]%)%}%e\n" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2945 "The following specs can be used: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2946 %t The MIME type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2947 %T MIME type, along with additional info |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2948 %n The `name' parameter |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2949 %d The description, if any |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2950 %l The length of the encoded part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2951 %p The part identifier number |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2952 %e Dots if the part isn't displayed") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2953 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2954 (defvar gnus-mime-button-line-format-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2955 '((?t gnus-tmp-type ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2956 (?T gnus-tmp-type-long ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2957 (?n gnus-tmp-name ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2958 (?d gnus-tmp-description ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2959 (?p gnus-tmp-id ?s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2960 (?l gnus-tmp-length ?d) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2961 (?e gnus-tmp-dots ?s))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2962 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2963 (defvar gnus-mime-button-commands |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2964 '((gnus-article-press-button "\r" "Toggle Display") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2965 (gnus-mime-view-part "v" "View Interactively...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2966 (gnus-mime-view-part-as-type "t" "View As Type...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2967 (gnus-mime-save-part "o" "Save...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2968 (gnus-mime-copy-part "c" "View As Text, In Other Buffer") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2969 (gnus-mime-inline-part "i" "View As Text, In This Buffer") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2970 (gnus-mime-internalize-part "E" "View Internally") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2971 (gnus-mime-externalize-part "e" "View Externally") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
2972 (gnus-mime-pipe-part "|" "Pipe To Command...") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
2973 (gnus-mime-action-on-part "." "Take action on the part"))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2974 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2975 (defun gnus-article-mime-part-status () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2976 (if gnus-article-mime-handle-alist-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2977 (format " (%d parts)" (length gnus-article-mime-handle-alist-1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2978 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2979 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2980 (defvar gnus-mime-button-map |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2981 (let ((map (make-sparse-keymap))) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2982 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2983 ;; (set-keymap-parent map gnus-article-mode-map) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2984 (define-key map gnus-mouse-2 'gnus-article-push-button) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2985 (define-key map gnus-down-mouse-3 'gnus-mime-button-menu) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2986 (dolist (c gnus-mime-button-commands) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2987 (define-key map (cadr c) (car c))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2988 map)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2989 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2990 (defun gnus-mime-button-menu (event) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2991 "Construct a context-sensitive menu of MIME commands." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2992 (interactive "e") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2993 (save-excursion |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2994 (mouse-set-point event) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2995 (gnus-article-check-buffer) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2996 (let ((response (x-popup-menu |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2997 t `("MIME Part" |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2998 ("" ,@(mapcar (lambda (c) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2999 (cons (caddr c) (car c))) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3000 gnus-mime-button-commands)))))) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3001 (if response |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3002 (call-interactively response))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3003 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3004 (defun gnus-mime-view-all-parts (&optional handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3005 "View all the MIME parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3006 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3007 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3008 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3009 (let ((handles (or handles gnus-article-mime-handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3010 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3011 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3012 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3013 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3014 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3015 (gnus-mime-view-all-parts (cdr handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3016 (mapcar 'mm-display-part handles))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3017 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3018 (defun gnus-mime-save-part () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3019 "Save the MIME part under point." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3020 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3021 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3022 (let ((data (get-text-property (point) 'gnus-data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3023 (mm-save-part data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3024 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3025 (defun gnus-mime-pipe-part () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3026 "Pipe the MIME part under point to a process." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3027 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3028 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3029 (let ((data (get-text-property (point) 'gnus-data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3030 (mm-pipe-part data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3031 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3032 (defun gnus-mime-view-part () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3033 "Interactively choose a viewing method for the MIME part under point." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3034 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3035 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3036 (let ((data (get-text-property (point) 'gnus-data))) |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34833
diff
changeset
|
3037 (push (setq data (copy-sequence data)) gnus-article-mime-handles) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3038 (mm-interactively-view-part data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3039 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3040 (defun gnus-mime-view-part-as-type-internal () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3041 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3042 (let* ((name (mail-content-type-get |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3043 (mm-handle-type (get-text-property (point) 'gnus-data)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3044 'name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3045 (def-type (and name (mm-default-file-encoding name)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3046 (and def-type (cons def-type 0)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3047 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3048 (defun gnus-mime-view-part-as-type (mime-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3049 "Choose a MIME media type, and view the part as such." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3050 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3051 (list (completing-read |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3052 "View as MIME type: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3053 (mapcar #'list (mailcap-mime-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3054 nil nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3055 (gnus-mime-view-part-as-type-internal)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3056 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3057 (let ((handle (get-text-property (point) 'gnus-data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3058 (gnus-mm-display-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3059 (mm-make-handle (mm-handle-buffer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3060 (cons mime-type (cdr (mm-handle-type handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3061 (mm-handle-encoding handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3062 (mm-handle-undisplayer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3063 (mm-handle-disposition handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3064 (mm-handle-description handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3065 (mm-handle-cache handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3066 (mm-handle-id handle))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3067 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3068 (defun gnus-mime-copy-part (&optional handle) |
45317
da1c26da109e
(gnus-mime-copy-part): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
43446
diff
changeset
|
3069 "Put the MIME part under point into a new buffer." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3070 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3071 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3072 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
35453
26726eff41ca
2001-01-21 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34833
diff
changeset
|
3073 (contents (mm-get-part handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3074 (base (file-name-nondirectory |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3075 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3076 (mail-content-type-get (mm-handle-type handle) 'name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3077 (mail-content-type-get (mm-handle-type handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3078 'filename) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3079 "*decoded*"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3080 (buffer (generate-new-buffer base))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3081 (switch-to-buffer buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3082 (insert contents) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3083 ;; We do it this way to make `normal-mode' set the appropriate mode. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3084 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3085 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3086 (setq buffer-file-name (expand-file-name base)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3087 (normal-mode)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3088 (setq buffer-file-name nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3089 (goto-char (point-min)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3090 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3091 (defun gnus-mime-inline-part (&optional handle arg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3092 "Insert the MIME part under point into the current buffer." |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3093 (interactive (list nil current-prefix-arg)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3094 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3095 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3096 contents charset |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3097 (b (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3098 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3099 (if (mm-handle-undisplayer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3100 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3101 (setq contents (mm-get-part handle)) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3102 (cond |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3103 ((not arg) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3104 (setq charset (or (mail-content-type-get |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3105 (mm-handle-type handle) 'charset) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3106 gnus-newsgroup-charset))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3107 ((numberp arg) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3108 (setq charset |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3109 (or (cdr (assq arg |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3110 gnus-summary-show-article-charset-alist)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3111 (read-coding-system "Charset: "))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3112 (forward-line 2) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3113 (mm-insert-inline handle |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3114 (if (and charset |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3115 (setq charset (mm-charset-to-coding-system |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3116 charset)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3117 (not (eq charset 'ascii))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3118 (mm-decode-coding-string contents charset) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3119 contents)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3120 (goto-char b)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3121 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3122 (defun gnus-mime-externalize-part (&optional handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3123 "View the MIME part under point with an external viewer." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3124 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3125 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3126 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3127 (mm-user-display-methods nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3128 (mm-inlined-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3129 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3130 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3131 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3132 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3133 (if (mm-handle-undisplayer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3134 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3135 (mm-display-part handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3136 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3137 (defun gnus-mime-internalize-part (&optional handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3138 "View the MIME part under point with an internal viewer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3139 In no internal viewer is available, use an external viewer." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3140 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3141 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3142 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3143 (mm-inlined-types '(".*")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3144 (mm-inline-large-images t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3145 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3146 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3147 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3148 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3149 (if (mm-handle-undisplayer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3150 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3151 (mm-display-part handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3152 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3153 (defun gnus-mime-action-on-part (&optional action) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3154 "Do something with the MIME attachment at \(point\)." |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3155 (interactive |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3156 (list (completing-read "Action: " gnus-mime-action-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3157 (gnus-article-check-buffer) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3158 (let ((action-pair (assoc action gnus-mime-action-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3159 (if action-pair |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3160 (funcall (cdr action-pair))))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3161 |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3162 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3163 (defun gnus-article-part-wrapper (n function) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3164 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3165 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3166 (when (> n (length gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3167 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3168 (gnus-article-goto-part n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3169 (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3170 (funcall function handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3171 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3172 (defun gnus-article-pipe-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3173 "Pipe MIME part N, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3174 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3175 (gnus-article-part-wrapper n 'mm-pipe-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3176 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3177 (defun gnus-article-save-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3178 "Save MIME part N, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3179 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3180 (gnus-article-part-wrapper n 'mm-save-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3181 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3182 (defun gnus-article-interactively-view-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3183 "View MIME part N interactively, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3184 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3185 (gnus-article-part-wrapper n 'mm-interactively-view-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3186 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3187 (defun gnus-article-copy-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3188 "Copy MIME part N, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3189 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3190 (gnus-article-part-wrapper n 'gnus-mime-copy-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3191 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3192 (defun gnus-article-externalize-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3193 "View MIME part N externally, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3194 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3195 (gnus-article-part-wrapper n 'gnus-mime-externalize-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3196 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3197 (defun gnus-article-inline-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3198 "Inline MIME part N, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3199 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3200 (gnus-article-part-wrapper n 'gnus-mime-inline-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3201 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3202 (defun gnus-article-mime-match-handle-first (condition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3203 (if condition |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3204 (let ((alist gnus-article-mime-handle-alist) ihandle n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3205 (while (setq ihandle (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3206 (if (and (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3207 ((functionp condition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3208 (funcall condition (cdr ihandle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3209 ((eq condition 'undisplayed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3210 (not (or (mm-handle-undisplayer (cdr ihandle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3211 (equal (mm-handle-media-type (cdr ihandle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3212 "multipart/alternative")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3213 ((eq condition 'undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3214 (not (mm-handle-undisplayer (cdr ihandle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3215 (t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3216 (gnus-article-goto-part (car ihandle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3217 (or (not n) (< (car ihandle) n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3218 (setq n (car ihandle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3219 (or n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3220 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3221 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3222 (defun gnus-article-view-part (&optional n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3223 "View MIME part N, which is the numerical prefix." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3224 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3225 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3226 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3227 (or (numberp n) (setq n (gnus-article-mime-match-handle-first |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3228 gnus-article-mime-match-handle-function))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3229 (when (> n (length gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3230 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3231 (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3232 (when (gnus-article-goto-part n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3233 (if (equal (car handle) "multipart/alternative") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3234 (gnus-article-press-button) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3235 (when (eq (gnus-mm-display-part handle) 'internal) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3236 (gnus-set-window-start))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3237 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3238 (defsubst gnus-article-mime-total-parts () |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3239 (if (bufferp (car gnus-article-mime-handles)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3240 1 ;; single part |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3241 (1- (length gnus-article-mime-handles)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3242 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3243 (defun gnus-mm-display-part (handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3244 "Display HANDLE and fix MIME button." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3245 (let ((id (get-text-property (point) 'gnus-part)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3246 (point (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3247 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3248 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3249 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3250 (let ((window (selected-window)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3251 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3252 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3253 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3254 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3255 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3256 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3257 (let ((win (get-buffer-window (current-buffer) t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3258 (beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3259 (when win |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3260 (select-window win)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3261 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3262 (forward-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3263 (if (mm-handle-displayed-p handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3264 ;; This will remove the part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3265 (mm-display-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3266 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3267 (narrow-to-region (point) (1+ (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3268 (mm-display-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3269 ;; We narrow to the part itself and |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3270 ;; then call the treatment functions. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3271 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3272 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3273 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3274 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3275 nil id |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3276 (gnus-article-mime-total-parts) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3277 (mm-handle-media-type handle))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3278 (select-window window)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3279 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3280 (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3281 (gnus-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3282 handle id (list (mm-handle-displayed-p handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3283 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3284 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3285 (defun gnus-article-goto-part (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3286 "Go to MIME part N." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3287 (let ((point (text-property-any (point-min) (point-max) 'gnus-part n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3288 (when point |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3289 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3290 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3291 (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3292 (let ((gnus-tmp-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3293 (or (mail-content-type-get (mm-handle-type handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3294 'name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3295 (mail-content-type-get (mm-handle-disposition handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3296 'filename) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3297 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3298 (gnus-tmp-type (mm-handle-media-type handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3299 (gnus-tmp-description |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3300 (mail-decode-encoded-word-string (or (mm-handle-description handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3301 ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3302 (gnus-tmp-dots |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3303 (if (if displayed (car displayed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3304 (mm-handle-displayed-p handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3305 "" "...")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3306 (gnus-tmp-length (with-current-buffer (mm-handle-buffer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3307 (buffer-size))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3308 gnus-tmp-type-long b e) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3309 (when (string-match ".*/" gnus-tmp-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3310 (setq gnus-tmp-name (replace-match "" t t gnus-tmp-name))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3311 (setq gnus-tmp-type-long (concat gnus-tmp-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3312 (and (not (equal gnus-tmp-name "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3313 (concat "; " gnus-tmp-name)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3314 (or (equal gnus-tmp-description "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3315 (setq gnus-tmp-type-long (concat " --- " gnus-tmp-type-long))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3316 (unless (bolp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3317 (insert "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3318 (setq b (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3319 (gnus-eval-format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3320 gnus-mime-button-line-format gnus-mime-button-line-format-alist |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3321 `(keymap ,gnus-mime-button-map |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3322 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3323 ;; local-map ,gnus-mime-button-map |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3324 gnus-callback gnus-mm-display-part |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3325 gnus-part ,gnus-tmp-id |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3326 article-type annotation |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3327 gnus-data ,handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3328 (setq e (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3329 (widget-convert-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3330 'link b e |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3331 :mime-handle handle |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3332 :action 'gnus-widget-press-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3333 :button-keymap gnus-mime-button-map |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3334 :help-echo |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3335 (lambda (widget/window &optional overlay pos) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3336 ;; Needed to properly clear the message due to a bug in |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3337 ;; wid-edit (XEmacs only). |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3338 (if (boundp 'help-echo-owns-message) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3339 (setq help-echo-owns-message t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3340 (format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3341 "%S: %s the MIME part; %S: more options" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3342 (aref gnus-mouse-2 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3343 ;; XEmacs will get a single widget arg; Emacs 21 will get |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3344 ;; window, overlay, position. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3345 (if (mm-handle-displayed-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3346 (if overlay |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3347 (with-current-buffer (gnus-overlay-buffer overlay) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3348 (widget-get (widget-at (gnus-overlay-start overlay)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3349 :mime-handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3350 (widget-get widget/window :mime-handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3351 "hide" "show") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3352 (aref gnus-down-mouse-3 0)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3353 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3354 (defun gnus-widget-press-button (elems el) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3355 (goto-char (widget-get elems :from)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3356 (gnus-article-press-button)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3357 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3358 (defvar gnus-displaying-mime nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3359 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3360 (defun gnus-display-mime (&optional ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3361 "Display the MIME parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3362 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3363 (save-selected-window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3364 (let ((window (get-buffer-window gnus-article-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3365 (point (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3366 (when window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3367 (select-window window) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3368 ;; We have to do this since selecting the window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3369 ;; may change the point. So we set the window point. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3370 (set-window-point window point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3371 (let* ((handles (or ihandles (mm-dissect-buffer) (mm-uu-dissect))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3372 buffer-read-only handle name type b e display) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3373 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3374 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3375 ;; Top-level call; we clean up. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3376 (when gnus-article-mime-handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3377 (mm-destroy-parts gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3378 (setq gnus-article-mime-handle-alist nil));; A trick. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3379 (setq gnus-article-mime-handles handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3380 ;; We allow users to glean info from the handles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3381 (when gnus-article-mime-part-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3382 (gnus-mime-part-function handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3383 (if (and handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3384 (or (not (stringp (car handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3385 (cdr handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3386 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3387 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3388 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3389 ;; Clean up for mime parts. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3390 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3391 (delete-region (point) (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3392 (let ((gnus-displaying-mime t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3393 (gnus-mime-display-part handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3394 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3395 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3396 (narrow-to-region (point) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3397 (gnus-treat-article nil 1 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3398 (widen))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3399 (unless ihandles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3400 ;; Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3401 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3402 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3403 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3404 (narrow-to-region (point-min) (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3405 (gnus-treat-article 'head)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3406 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3407 (defvar gnus-mime-display-multipart-as-mixed nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3408 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3409 (defun gnus-mime-display-part (handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3410 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3411 ;; Single part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3412 ((not (stringp (car handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3413 (gnus-mime-display-single handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3414 ;; User-defined multipart |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3415 ((cdr (assoc (car handle) gnus-mime-multipart-functions)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3416 (funcall (cdr (assoc (car handle) gnus-mime-multipart-functions)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3417 handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3418 ;; multipart/alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3419 ((and (equal (car handle) "multipart/alternative") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3420 (not gnus-mime-display-multipart-as-mixed)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3421 (let ((id (1+ (length gnus-article-mime-handle-alist)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3422 (push (cons id handle) gnus-article-mime-handle-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3423 (gnus-mime-display-alternative (cdr handle) nil nil id))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3424 ;; multipart/related |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3425 ((and (equal (car handle) "multipart/related") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3426 (not gnus-mime-display-multipart-as-mixed)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3427 ;;;!!!We should find the start part, but we just default |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3428 ;;;!!!to the first part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3429 (gnus-mime-display-part (cadr handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3430 ;; Other multiparts are handled like multipart/mixed. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3431 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3432 (gnus-mime-display-mixed (cdr handle))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3433 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3434 (defun gnus-mime-part-function (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3435 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3436 (mapcar 'gnus-mime-part-function (cdr handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3437 (funcall gnus-article-mime-part-function handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3438 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3439 (defun gnus-mime-display-mixed (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3440 (mapcar 'gnus-mime-display-part handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3441 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3442 (defun gnus-mime-display-single (handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3443 (let ((type (mm-handle-media-type handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3444 (ignored gnus-ignored-mime-types) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3445 (not-attachment t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3446 (move nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3447 display text) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3448 (catch 'ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3449 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3450 (while ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3451 (when (string-match (pop ignored) type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3452 (throw 'ignored nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3453 (if (and (setq not-attachment |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3454 (and (not (mm-inline-override-p handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3455 (or (not (mm-handle-disposition handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3456 (equal (car (mm-handle-disposition handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3457 "inline") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3458 (mm-attachment-override-p handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3459 (mm-automatic-display-p handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3460 (or (mm-inlined-p handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3461 (mm-automatic-external-display-p type))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3462 (setq display t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3463 (when (equal (mm-handle-media-supertype handle) "text") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3464 (setq text t))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3465 (let ((id (1+ (length gnus-article-mime-handle-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3466 beg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3467 (push (cons id handle) gnus-article-mime-handle-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3468 (when (or (not display) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3469 (not (gnus-unbuttonized-mime-type-p type))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3470 ;(gnus-article-insert-newline) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3471 (gnus-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3472 handle id (list (or display (and not-attachment text)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3473 (gnus-article-insert-newline) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3474 ;(gnus-article-insert-newline) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3475 (setq move t)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3476 (setq beg (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3477 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3478 (display |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3479 (when move |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3480 (forward-line -2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3481 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3482 (let ((mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3483 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3484 (save-excursion (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3485 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3486 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3487 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3488 (mm-display-part handle t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3489 (goto-char (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3490 ((and text not-attachment) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3491 (when move |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3492 (forward-line -2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3493 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3494 (gnus-article-insert-newline) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3495 (mm-insert-inline handle (mm-get-part handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3496 (goto-char (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3497 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3498 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3499 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3500 (narrow-to-region beg (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3501 (gnus-treat-article |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3502 nil id |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3503 (gnus-article-mime-total-parts) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3504 (mm-handle-media-type handle))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3505 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3506 (defun gnus-unbuttonized-mime-type-p (type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3507 "Say whether TYPE is to be unbuttonized." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3508 (unless gnus-inhibit-mime-unbuttonizing |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3509 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3510 (let ((types gnus-unbuttonized-mime-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3511 (while types |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3512 (when (string-match (pop types) type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3513 (throw 'found t))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3514 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3515 (defun gnus-article-insert-newline () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3516 "Insert a newline, but mark it as undeletable." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3517 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3518 (point) (progn (insert "\n") (point)) 'gnus-undeletable t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3519 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3520 (defun gnus-mime-display-alternative (handles &optional preferred ibegend id) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3521 (let* ((preferred (or preferred (mm-preferred-alternative handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3522 (ihandles handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3523 (point (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3524 handle buffer-read-only from props begend not-pref) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3525 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3526 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3527 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3528 (narrow-to-region (car ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3529 (or (cdr ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3530 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3531 (goto-char (car ibegend)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3532 (forward-line 2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3533 (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3534 (delete-region (point-min) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3535 (mm-remove-parts handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3536 (setq begend (list (point-marker))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3537 ;; Do the toggle. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3538 (unless (setq not-pref (cadr (member preferred ihandles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3539 (setq not-pref (car ihandles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3540 (when (or ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3541 (not (gnus-unbuttonized-mime-type-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3542 "multipart/alternative"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3543 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3544 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3545 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3546 (insert (format "%d. " id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3547 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3548 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3549 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3550 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3551 (setq gnus-article-mime-handle-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3552 ',gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3553 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3554 ',ihandles ',not-pref ',begend ,id)) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3555 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3556 ;; local-map ,gnus-mime-button-map |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3557 ,gnus-mouse-face-prop ,gnus-article-mouse-face |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3558 face ,gnus-article-button-face |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3559 keymap ,gnus-mime-button-map |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3560 gnus-part ,id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3561 gnus-data ,handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3562 (widget-convert-button 'link from (point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3563 :action 'gnus-widget-press-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3564 :button-keymap gnus-widget-button-keymap) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3565 ;; Do the handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3566 (while (setq handle (pop handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3567 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3568 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3569 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3570 (insert (format "(%c) %-18s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3571 (if (equal handle preferred) ?* ? ) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3572 (mm-handle-media-type handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3573 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3574 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3575 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3576 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3577 (setq gnus-article-mime-handle-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3578 ',gnus-article-mime-handle-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3579 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3580 ',ihandles ',handle ',begend ,id)) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3581 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3582 ;; local-map ,gnus-mime-button-map |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3583 ,gnus-mouse-face-prop ,gnus-article-mouse-face |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3584 face ,gnus-article-button-face |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3585 keymap ,gnus-mime-button-map |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3586 gnus-part ,id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3587 gnus-data ,handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3588 (widget-convert-button 'link from (point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3589 :action 'gnus-widget-press-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3590 :button-keymap gnus-widget-button-keymap) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3591 (insert " ")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3592 (insert "\n\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3593 (when preferred |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3594 (if (stringp (car preferred)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3595 (gnus-display-mime preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3596 (let ((mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3597 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3598 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3599 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3600 (mm-display-part preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3601 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3602 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3603 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3604 (narrow-to-region (car begend) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3605 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3606 nil (length gnus-article-mime-handle-alist) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3607 (gnus-article-mime-total-parts) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3608 (mm-handle-media-type handle)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3609 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3610 (setcdr begend (point-marker))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3611 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3612 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3613 |
17493 | 3614 (defun gnus-article-wash-status () |
3615 "Return a string which display status of article washing." | |
3616 (save-excursion | |
3617 (set-buffer gnus-article-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3618 (let ((cite (memq 'cite gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3619 (headers (memq 'headers gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3620 (boring (memq 'boring-headers gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3621 (pgp (memq 'pgp gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3622 (pem (memq 'pem gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3623 (signature (memq 'signature gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3624 (overstrike (memq 'overstrike gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3625 (emphasis (memq 'emphasis gnus-article-wash-types))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3626 (format "%c%c%c%c%c%c" |
17493 | 3627 (if cite ?c ? ) |
3628 (if (or headers boring) ?h ? ) | |
3629 (if (or pgp pem) ?p ? ) | |
3630 (if signature ?s ? ) | |
3631 (if overstrike ?o ? ) | |
3632 (if emphasis ?e ? ))))) | |
3633 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3634 (defalias 'gnus-article-hide-headers-if-wanted 'gnus-article-maybe-hide-headers) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3635 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3636 (defun gnus-article-maybe-hide-headers () |
17493 | 3637 "Hide unwanted headers if `gnus-have-all-headers' is nil. |
3638 Provided for backwards compatibility." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3639 (when (and (or (not (gnus-buffer-live-p gnus-summary-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3640 (not (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3641 gnus-have-all-headers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3642 (not gnus-inhibit-hiding)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3643 (gnus-article-hide-headers))) |
17493 | 3644 |
3645 ;;; Article savers. | |
3646 | |
3647 (defun gnus-output-to-file (file-name) | |
3648 "Append the current article to a file named FILE-NAME." | |
3649 (let ((artbuf (current-buffer))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3650 (with-temp-buffer |
17493 | 3651 (insert-buffer-substring artbuf) |
3652 ;; Append newline at end of the buffer as separator, and then | |
3653 ;; save it to file. | |
3654 (goto-char (point-max)) | |
3655 (insert "\n") | |
38861
f8833aa83b5e
* gnus-art.el (gnus-output-to-file): Bind file-name-coding-system.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38413
diff
changeset
|
3656 (let ((file-name-coding-system nnmail-pathname-coding-system)) |
f8833aa83b5e
* gnus-art.el (gnus-output-to-file): Bind file-name-coding-system.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38413
diff
changeset
|
3657 (mm-append-to-file (point-min) (point-max) file-name)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3658 t))) |
17493 | 3659 |
3660 (defun gnus-narrow-to-page (&optional arg) | |
3661 "Narrow the article buffer to a page. | |
3662 If given a numerical ARG, move forward ARG pages." | |
3663 (interactive "P") | |
3664 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
3665 (save-excursion | |
3666 (set-buffer gnus-article-buffer) | |
3667 (goto-char (point-min)) | |
3668 (widen) | |
3669 ;; Remove any old next/prev buttons. | |
3670 (when (gnus-visual-p 'page-marker) | |
3671 (let ((buffer-read-only nil)) | |
3672 (gnus-remove-text-with-property 'gnus-prev) | |
3673 (gnus-remove-text-with-property 'gnus-next))) | |
3674 (when | |
3675 (cond ((< arg 0) | |
3676 (re-search-backward page-delimiter nil 'move (1+ (abs arg)))) | |
3677 ((> arg 0) | |
3678 (re-search-forward page-delimiter nil 'move arg))) | |
3679 (goto-char (match-end 0))) | |
3680 (narrow-to-region | |
3681 (point) | |
3682 (if (re-search-forward page-delimiter nil 'move) | |
3683 (match-beginning 0) | |
3684 (point))) | |
3685 (when (and (gnus-visual-p 'page-marker) | |
3686 (not (= (point-min) 1))) | |
3687 (save-excursion | |
3688 (goto-char (point-min)) | |
3689 (gnus-insert-prev-page-button))) | |
3690 (when (and (gnus-visual-p 'page-marker) | |
3691 (< (+ (point-max) 2) (buffer-size))) | |
3692 (save-excursion | |
3693 (goto-char (point-max)) | |
3694 (gnus-insert-next-page-button))))) | |
3695 | |
3696 ;; Article mode commands | |
3697 | |
3698 (defun gnus-article-goto-next-page () | |
3699 "Show the next page of the article." | |
3700 (interactive) | |
3701 (when (gnus-article-next-page) | |
3702 (goto-char (point-min)) | |
3703 (gnus-article-read-summary-keys nil (gnus-character-to-event ?n)))) | |
3704 | |
3705 (defun gnus-article-goto-prev-page () | |
3706 "Show the next page of the article." | |
3707 (interactive) | |
3708 (if (bobp) (gnus-article-read-summary-keys nil (gnus-character-to-event ?p)) | |
3709 (gnus-article-prev-page nil))) | |
3710 | |
3711 (defun gnus-article-next-page (&optional lines) | |
3712 "Show the next page of the current article. | |
3713 If end of article, return non-nil. Otherwise return nil. | |
3714 Argument LINES specifies lines to be scrolled up." | |
3715 (interactive "p") | |
3716 (move-to-window-line -1) | |
3717 (if (save-excursion | |
3718 (end-of-line) | |
3719 (and (pos-visible-in-window-p) ;Not continuation line. | |
3720 (eobp))) | |
3721 ;; Nothing in this page. | |
3722 (if (or (not gnus-page-broken) | |
3723 (save-excursion | |
3724 (save-restriction | |
3725 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
3726 t ;Nothing more. | |
3727 (gnus-narrow-to-page 1) ;Go to next page. | |
3728 nil) | |
3729 ;; More in this page. | |
3730 (let ((scroll-in-place nil)) | |
3731 (condition-case () | |
3732 (scroll-up lines) | |
3733 (end-of-buffer | |
3734 ;; Long lines may cause an end-of-buffer error. | |
3735 (goto-char (point-max))))) | |
3736 (move-to-window-line 0) | |
3737 nil)) | |
3738 | |
3739 (defun gnus-article-prev-page (&optional lines) | |
3740 "Show previous page of current article. | |
3741 Argument LINES specifies lines to be scrolled down." | |
3742 (interactive "p") | |
3743 (move-to-window-line 0) | |
3744 (if (and gnus-page-broken | |
3745 (bobp) | |
3746 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
3747 (progn | |
3748 (gnus-narrow-to-page -1) ;Go to previous page. | |
3749 (goto-char (point-max)) | |
3750 (recenter -1)) | |
3751 (let ((scroll-in-place nil)) | |
3752 (prog1 | |
3753 (condition-case () | |
3754 (scroll-down lines) | |
3755 (beginning-of-buffer | |
3756 (goto-char (point-min)))) | |
3757 (move-to-window-line 0))))) | |
3758 | |
3759 (defun gnus-article-refer-article () | |
3760 "Read article specified by message-id around point." | |
3761 (interactive) | |
3762 (let ((point (point))) | |
3763 (search-forward ">" nil t) ;Move point to end of "<....>". | |
3764 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
3765 (let ((message-id (match-string 1))) | |
3766 (goto-char point) | |
3767 (set-buffer gnus-summary-buffer) | |
3768 (gnus-summary-refer-article message-id)) | |
3769 (goto-char (point)) | |
3770 (error "No references around point")))) | |
3771 | |
3772 (defun gnus-article-show-summary () | |
3773 "Reconfigure windows to show summary buffer." | |
3774 (interactive) | |
3775 (if (not (gnus-buffer-live-p gnus-summary-buffer)) | |
3776 (error "There is no summary buffer for this article buffer") | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3777 (gnus-article-set-globals) |
17493 | 3778 (gnus-configure-windows 'article) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3779 (gnus-summary-goto-subject gnus-current-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3780 (gnus-summary-position-point))) |
17493 | 3781 |
3782 (defun gnus-article-describe-briefly () | |
3783 "Describe article mode commands briefly." | |
3784 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3785 (gnus-message 6 (substitute-command-keys "\\<gnus-article-mode-map>\\[gnus-article-goto-next-page]:Next page \\[gnus-article-goto-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) |
17493 | 3786 |
3787 (defun gnus-article-summary-command () | |
3788 "Execute the last keystroke in the summary buffer." | |
3789 (interactive) | |
3790 (let ((obuf (current-buffer)) | |
3791 (owin (current-window-configuration)) | |
3792 func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3793 (switch-to-buffer gnus-article-current-summary 'norecord) |
17493 | 3794 (setq func (lookup-key (current-local-map) (this-command-keys))) |
3795 (call-interactively func) | |
3796 (set-buffer obuf) | |
3797 (set-window-configuration owin) | |
3798 (set-window-point (get-buffer-window (current-buffer)) (point)))) | |
3799 | |
3800 (defun gnus-article-summary-command-nosave () | |
3801 "Execute the last keystroke in the summary buffer." | |
3802 (interactive) | |
3803 (let (func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3804 (pop-to-buffer gnus-article-current-summary 'norecord) |
17493 | 3805 (setq func (lookup-key (current-local-map) (this-command-keys))) |
3806 (call-interactively func))) | |
3807 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3808 (defun gnus-article-check-buffer () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3809 "Beep if not in an article buffer." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3810 (unless (equal major-mode 'gnus-article-mode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3811 (error "Command invoked outside of a Gnus article buffer"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3812 |
17493 | 3813 (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) |
3814 "Read a summary buffer key sequence and execute it from the article buffer." | |
3815 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3816 (gnus-article-check-buffer) |
17493 | 3817 (let ((nosaves |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3818 '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3819 "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3820 "=" "^" "\M-^" "|")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3821 (nosave-but-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3822 '("A\r")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3823 (nosave-in-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3824 '("\C-d")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3825 (up-to-top |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3826 '("n" "Gn" "p" "Gp")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3827 keys new-sum-point) |
17493 | 3828 (save-excursion |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3829 (set-buffer gnus-article-current-summary) |
17493 | 3830 (let (gnus-pick-mode) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3831 (push (or key last-command-event) unread-command-events) |
32939
c8119677d63e
Use (featurep 'xemacs) instead of the `gnus-xemacs' variable, as the
Miles Bader <miles@gnu.org>
parents:
32927
diff
changeset
|
3832 (setq keys (if (featurep 'xemacs) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3833 (events-to-keys (read-key-sequence nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3834 (read-key-sequence nil))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3835 |
17493 | 3836 (message "") |
3837 | |
3838 (if (or (member keys nosaves) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3839 (member keys nosave-but-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3840 (member keys nosave-in-article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3841 (let (func) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3842 (save-window-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3843 (pop-to-buffer gnus-article-current-summary 'norecord) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3844 ;; We disable the pick minor mode commands. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3845 (let (gnus-pick-mode) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3846 (setq func (lookup-key (current-local-map) keys)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3847 (if (or (not func) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3848 (numberp func)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3849 (ding) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3850 (unless (member keys nosave-in-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3851 (set-buffer gnus-article-current-summary)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3852 (call-interactively func) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3853 (setq new-sum-point (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3854 (when (member keys nosave-but-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3855 (pop-to-buffer gnus-article-buffer 'norecord))) |
17493 | 3856 ;; These commands should restore window configuration. |
3857 (let ((obuf (current-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3858 (owin (current-window-configuration)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3859 (opoint (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3860 (summary gnus-article-current-summary) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3861 func in-buffer selected) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3862 (if not-restore-window |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3863 (pop-to-buffer summary 'norecord) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3864 (switch-to-buffer summary 'norecord)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3865 (setq in-buffer (current-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3866 ;; We disable the pick minor mode commands. |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3867 (if (and (setq func (let (gnus-pick-mode) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3868 (lookup-key (current-local-map) keys))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3869 (functionp func)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3870 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3871 (call-interactively func) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3872 (setq new-sum-point (point)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3873 (when (eq in-buffer (current-buffer)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3874 (setq selected (gnus-summary-select-article)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3875 (set-buffer obuf) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3876 (unless not-restore-window |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3877 (set-window-configuration owin)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3878 (when (eq selected 'old) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3879 (article-goto-body) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3880 (set-window-start (get-buffer-window (current-buffer)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3881 1) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3882 (set-window-point (get-buffer-window (current-buffer)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3883 (point))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3884 (let ((win (get-buffer-window gnus-article-current-summary))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3885 (when win |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3886 (set-window-point win new-sum-point)))) ) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3887 (switch-to-buffer gnus-article-buffer) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3888 (ding)))))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3889 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3890 (defun gnus-article-describe-key (key) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3891 "Display documentation of the function invoked by KEY. KEY is a string." |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3892 (interactive "kDescribe key: ") |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3893 (gnus-article-check-buffer) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3894 (if (eq (key-binding key) 'gnus-article-read-summary-keys) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3895 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3896 (set-buffer gnus-article-current-summary) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3897 (let (gnus-pick-mode) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3898 (push (elt key 0) unread-command-events) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3899 (setq key (if (featurep 'xemacs) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3900 (events-to-keys (read-key-sequence "Describe key: ")) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3901 (read-key-sequence "Describe key: ")))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3902 (describe-key key)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3903 (describe-key key))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3904 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3905 (defun gnus-article-describe-key-briefly (key &optional insert) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3906 "Display documentation of the function invoked by KEY. KEY is a string." |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3907 (interactive "kDescribe key: \nP") |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3908 (gnus-article-check-buffer) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3909 (if (eq (key-binding key) 'gnus-article-read-summary-keys) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3910 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3911 (set-buffer gnus-article-current-summary) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3912 (let (gnus-pick-mode) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3913 (push (elt key 0) unread-command-events) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3914 (setq key (if (featurep 'xemacs) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3915 (events-to-keys (read-key-sequence "Describe key: ")) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3916 (read-key-sequence "Describe key: ")))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3917 (describe-key-briefly key insert)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3918 (describe-key-briefly key insert))) |
17493 | 3919 |
3920 (defun gnus-article-hide (&optional arg force) | |
3921 "Hide all the gruft in the current article. | |
3922 This means that PGP stuff, signatures, cited text and (some) | |
3923 headers will be hidden. | |
3924 If given a prefix, show the hidden text instead." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3925 (interactive (append (gnus-article-hidden-arg) (list 'force))) |
17493 | 3926 (gnus-article-hide-headers arg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3927 (gnus-article-hide-list-identifiers arg) |
17493 | 3928 (gnus-article-hide-pgp arg) |
3929 (gnus-article-hide-citation-maybe arg force) | |
3930 (gnus-article-hide-signature arg)) | |
3931 | |
3932 (defun gnus-article-maybe-highlight () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3933 "Do some article highlighting if article highlighting is requested." |
17493 | 3934 (when (gnus-visual-p 'article-highlight 'highlight) |
3935 (gnus-article-highlight-some))) | |
3936 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3937 (defun gnus-check-group-server () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3938 ;; Make sure the connection to the server is alive. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3939 (unless (gnus-server-opened |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3940 (gnus-find-method-for-group gnus-newsgroup-name)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3941 (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3942 (gnus-request-group gnus-newsgroup-name t))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3943 |
17493 | 3944 (defun gnus-request-article-this-buffer (article group) |
3945 "Get an article and insert it into this buffer." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3946 (let (do-update-line sparse-header) |
17493 | 3947 (prog1 |
3948 (save-excursion | |
3949 (erase-buffer) | |
3950 (gnus-kill-all-overlays) | |
3951 (setq group (or group gnus-newsgroup-name)) | |
3952 | |
3953 ;; Using `gnus-request-article' directly will insert the article into | |
3954 ;; `nntp-server-buffer' - so we'll save some time by not having to | |
3955 ;; copy it from the server buffer into the article buffer. | |
3956 | |
3957 ;; We only request an article by message-id when we do not have the | |
3958 ;; headers for it, so we'll have to get those. | |
3959 (when (stringp article) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3960 (gnus-read-header article)) |
17493 | 3961 |
3962 ;; If the article number is negative, that means that this article | |
3963 ;; doesn't belong in this newsgroup (possibly), so we find its | |
3964 ;; message-id and request it by id instead of number. | |
3965 (when (and (numberp article) | |
3966 gnus-summary-buffer | |
3967 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3968 (gnus-buffer-exists-p gnus-summary-buffer)) |
17493 | 3969 (save-excursion |
3970 (set-buffer gnus-summary-buffer) | |
3971 (let ((header (gnus-summary-article-header article))) | |
3972 (when (< article 0) | |
3973 (cond | |
3974 ((memq article gnus-newsgroup-sparse) | |
3975 ;; This is a sparse gap article. | |
3976 (setq do-update-line article) | |
3977 (setq article (mail-header-id header)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3978 (setq sparse-header (gnus-read-header article)) |
17493 | 3979 (setq gnus-newsgroup-sparse |
3980 (delq article gnus-newsgroup-sparse))) | |
3981 ((vectorp header) | |
3982 ;; It's a real article. | |
3983 (setq article (mail-header-id header))) | |
3984 (t | |
3985 ;; It is an extracted pseudo-article. | |
3986 (setq article 'pseudo) | |
3987 (gnus-request-pseudo-article header)))) | |
3988 | |
3989 (let ((method (gnus-find-method-for-group | |
3990 gnus-newsgroup-name))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3991 (when (and (eq (car method) 'nneething) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3992 (vectorp header)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3993 (let ((dir (expand-file-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3994 (mail-header-subject header) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3995 (file-name-as-directory |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3996 (or (cadr (assq 'nneething-address method)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3997 (nth 1 method)))))) |
17493 | 3998 (when (file-directory-p dir) |
3999 (setq article 'nneething) | |
4000 (gnus-group-enter-directory dir)))))))) | |
4001 | |
4002 (cond | |
4003 ;; Refuse to select canceled articles. | |
4004 ((and (numberp article) | |
4005 gnus-summary-buffer | |
4006 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4007 (gnus-buffer-exists-p gnus-summary-buffer) |
17493 | 4008 (eq (cdr (save-excursion |
4009 (set-buffer gnus-summary-buffer) | |
4010 (assq article gnus-newsgroup-reads))) | |
4011 gnus-canceled-mark)) | |
4012 nil) | |
4013 ;; We first check `gnus-original-article-buffer'. | |
4014 ((and (get-buffer gnus-original-article-buffer) | |
4015 (numberp article) | |
4016 (save-excursion | |
4017 (set-buffer gnus-original-article-buffer) | |
4018 (and (equal (car gnus-original-article) group) | |
4019 (eq (cdr gnus-original-article) article)))) | |
4020 (insert-buffer-substring gnus-original-article-buffer) | |
4021 'article) | |
4022 ;; Check the backlog. | |
4023 ((and gnus-keep-backlog | |
4024 (gnus-backlog-request-article group article (current-buffer))) | |
4025 'article) | |
4026 ;; Check asynchronous pre-fetch. | |
4027 ((gnus-async-request-fetched-article group article (current-buffer)) | |
4028 (gnus-async-prefetch-next group article gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4029 (when (and (numberp article) gnus-keep-backlog) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4030 (gnus-backlog-enter-article group article (current-buffer))) |
17493 | 4031 'article) |
4032 ;; Check the cache. | |
4033 ((and gnus-use-cache | |
4034 (numberp article) | |
4035 (gnus-cache-request-article article group)) | |
4036 'article) | |
4037 ;; Get the article and put into the article buffer. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4038 ((or (stringp article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4039 (numberp article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4040 (let ((gnus-override-method gnus-override-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4041 (methods (and (stringp article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4042 gnus-refer-article-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4043 result |
17493 | 4044 (buffer-read-only nil)) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4045 (if (or (not (listp methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4046 (and (symbolp (car methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4047 (assq (car methods) nnoo-definition-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4048 (setq methods (list methods))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4049 (when (and (null gnus-override-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4050 methods) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4051 (setq gnus-override-method (pop methods))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4052 (while (not result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4053 (when (eq gnus-override-method 'current) |
39335
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4054 (setq gnus-override-method |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4055 (with-current-buffer gnus-summary-buffer |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4056 gnus-current-select-method))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4057 (erase-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4058 (gnus-kill-all-overlays) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4059 (let ((gnus-newsgroup-name group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4060 (gnus-check-group-server)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4061 (when (gnus-request-article article group (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4062 (when (numberp article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4063 (gnus-async-prefetch-next group article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4064 gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4065 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4066 (gnus-backlog-enter-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4067 group article (current-buffer)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4068 (setq result 'article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4069 (if (not result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4070 (if methods |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4071 (setq gnus-override-method (pop methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4072 (setq result 'done)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4073 (and (eq result 'article) 'article))) |
17493 | 4074 ;; It was a pseudo. |
4075 (t article))) | |
4076 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4077 ;; Associate this article with the current summary buffer. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4078 (setq gnus-article-current-summary gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4079 |
17493 | 4080 ;; Take the article from the original article buffer |
4081 ;; and place it in the buffer it's supposed to be in. | |
4082 (when (and (get-buffer gnus-article-buffer) | |
4083 (equal (buffer-name (current-buffer)) | |
4084 (buffer-name (get-buffer gnus-article-buffer)))) | |
4085 (save-excursion | |
4086 (if (get-buffer gnus-original-article-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4087 (set-buffer gnus-original-article-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4088 (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4089 (buffer-disable-undo) |
17493 | 4090 (setq major-mode 'gnus-original-article-mode) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4091 (setq buffer-read-only t)) |
17493 | 4092 (let (buffer-read-only) |
4093 (erase-buffer) | |
4094 (insert-buffer-substring gnus-article-buffer)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4095 (setq gnus-original-article (cons group article))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4096 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4097 ;; Decode charsets. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4098 (run-hooks 'gnus-article-decode-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4099 ;; Mark article as decoded or not. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4100 (setq gnus-article-decoded-p gnus-article-decode-hook)) |
17493 | 4101 |
4102 ;; Update sparse articles. | |
4103 (when (and do-update-line | |
4104 (or (numberp article) | |
4105 (stringp article))) | |
4106 (let ((buf (current-buffer))) | |
4107 (set-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4108 (gnus-summary-update-article do-update-line sparse-header) |
17493 | 4109 (gnus-summary-goto-subject do-update-line nil t) |
4110 (set-window-point (get-buffer-window (current-buffer) t) | |
4111 (point)) | |
4112 (set-buffer buf)))))) | |
4113 | |
4114 ;;; | |
4115 ;;; Article editing | |
4116 ;;; | |
4117 | |
4118 (defcustom gnus-article-edit-mode-hook nil | |
4119 "Hook run in article edit mode buffers." | |
4120 :group 'gnus-article-various | |
4121 :type 'hook) | |
4122 | |
4123 (defvar gnus-article-edit-done-function nil) | |
4124 | |
4125 (defvar gnus-article-edit-mode-map nil) | |
4126 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4127 ;; Should we be using derived.el for this? |
17493 | 4128 (unless gnus-article-edit-mode-map |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4129 (setq gnus-article-edit-mode-map (make-sparse-keymap)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4130 (set-keymap-parent gnus-article-edit-mode-map text-mode-map) |
17493 | 4131 |
4132 (gnus-define-keys gnus-article-edit-mode-map | |
4133 "\C-c\C-c" gnus-article-edit-done | |
4134 "\C-c\C-k" gnus-article-edit-exit) | |
4135 | |
4136 (gnus-define-keys (gnus-article-edit-wash-map | |
4137 "\C-c\C-w" gnus-article-edit-mode-map) | |
4138 "f" gnus-article-edit-full-stops)) | |
4139 | |
43273
b8391c00e2c9
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43166
diff
changeset
|
4140 (define-derived-mode gnus-article-edit-mode text-mode "Article Edit" |
17493 | 4141 "Major mode for editing articles. |
4142 This is an extended text-mode. | |
4143 | |
4144 \\{gnus-article-edit-mode-map}" | |
4145 (make-local-variable 'gnus-article-edit-done-function) | |
4146 (make-local-variable 'gnus-prev-winconf) | |
43273
b8391c00e2c9
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43166
diff
changeset
|
4147 (set (make-local-variable 'font-lock-defaults) |
b8391c00e2c9
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43166
diff
changeset
|
4148 '(message-font-lock-keywords t)) |
17493 | 4149 (setq buffer-read-only nil) |
4150 (buffer-enable-undo) | |
43273
b8391c00e2c9
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43166
diff
changeset
|
4151 (widen)) |
17493 | 4152 |
4153 (defun gnus-article-edit (&optional force) | |
4154 "Edit the current article. | |
4155 This will have permanent effect only in mail groups. | |
4156 If FORCE is non-nil, allow editing of articles even in read-only | |
4157 groups." | |
4158 (interactive "P") | |
4159 (when (and (not force) | |
4160 (gnus-group-read-only-p)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4161 (error "The current newsgroup does not support article editing")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4162 (gnus-article-date-original) |
17493 | 4163 (gnus-article-edit-article |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4164 'ignore |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4165 `(lambda (no-highlight) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4166 'ignore |
17493 | 4167 (gnus-summary-edit-article-done |
4168 ,(or (mail-header-references gnus-current-headers) "") | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4169 ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))) |
17493 | 4170 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4171 (defun gnus-article-edit-article (start-func exit-func) |
17493 | 4172 "Start editing the contents of the current article buffer." |
4173 (let ((winconf (current-window-configuration))) | |
4174 (set-buffer gnus-article-buffer) | |
4175 (gnus-article-edit-mode) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4176 (funcall start-func) |
17493 | 4177 (gnus-configure-windows 'edit-article) |
4178 (setq gnus-article-edit-done-function exit-func) | |
4179 (setq gnus-prev-winconf winconf) | |
4180 (gnus-message 6 "C-c C-c to end edits"))) | |
4181 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4182 (defun gnus-article-edit-done (&optional arg) |
17493 | 4183 "Update the article edits and exit." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4184 (interactive "P") |
43446
0bd481e606f9
* gnus-art.el (gnus-article-edit-done): Widen the article buffer.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
43273
diff
changeset
|
4185 (widen) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4186 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4187 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4188 (when (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4189 (let ((lines (count-lines (point) (point-max))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4190 (length (- (point-max) (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4191 (case-fold-search t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4192 (body (copy-marker (point)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4193 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4194 (when (re-search-forward "^content-length:[ \t]\\([0-9]+\\)" body t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4195 (delete-region (match-beginning 1) (match-end 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4196 (insert (number-to-string length))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4197 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4198 (when (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4199 "^x-content-length:[ \t]\\([0-9]+\\)" body t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4200 (delete-region (match-beginning 1) (match-end 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4201 (insert (number-to-string length))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4202 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4203 (when (re-search-forward "^lines:[ \t]\\([0-9]+\\)" body t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4204 (delete-region (match-beginning 1) (match-end 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4205 (insert (number-to-string lines))))))) |
17493 | 4206 (let ((func gnus-article-edit-done-function) |
4207 (buf (current-buffer)) | |
4208 (start (window-start))) | |
4209 (gnus-article-edit-exit) | |
4210 (save-excursion | |
4211 (set-buffer buf) | |
4212 (let ((buffer-read-only nil)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4213 (funcall func arg)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4214 ;; The cache and backlog have to be flushed somewhat. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4215 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4216 (gnus-backlog-remove-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4217 (car gnus-article-current) (cdr gnus-article-current))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4218 ;; Flush original article as well. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4219 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4220 (when (get-buffer gnus-original-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4221 (set-buffer gnus-original-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4222 (setq gnus-original-article nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4223 (when gnus-use-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4224 (gnus-cache-update-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4225 (car gnus-article-current) (cdr gnus-article-current)))) |
17493 | 4226 (set-buffer buf) |
4227 (set-window-start (get-buffer-window buf) start) | |
4228 (set-window-point (get-buffer-window buf) (point)))) | |
4229 | |
4230 (defun gnus-article-edit-exit () | |
4231 "Exit the article editing without updating." | |
4232 (interactive) | |
4233 ;; We remove all text props from the article buffer. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4234 (let ((buf (buffer-substring-no-properties (point-min) (point-max))) |
17493 | 4235 (curbuf (current-buffer)) |
4236 (p (point)) | |
4237 (window-start (window-start))) | |
4238 (erase-buffer) | |
4239 (insert buf) | |
4240 (let ((winconf gnus-prev-winconf)) | |
4241 (gnus-article-mode) | |
4242 (set-window-configuration winconf) | |
4243 ;; Tippy-toe some to make sure that point remains where it was. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4244 (save-current-buffer |
17493 | 4245 (set-buffer curbuf) |
4246 (set-window-start (get-buffer-window (current-buffer)) window-start) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4247 (goto-char p))))) |
17493 | 4248 |
4249 (defun gnus-article-edit-full-stops () | |
4250 "Interactively repair spacing at end of sentences." | |
4251 (interactive) | |
4252 (save-excursion | |
4253 (goto-char (point-min)) | |
4254 (search-forward-regexp "^$" nil t) | |
4255 (let ((case-fold-search nil)) | |
4256 (query-replace-regexp "\\([.!?][])}]* \\)\\([[({A-Z]\\)" "\\1 \\2")))) | |
4257 | |
4258 ;;; | |
4259 ;;; Article highlights | |
4260 ;;; | |
4261 | |
4262 ;; Written by Per Abrahamsen <abraham@iesd.auc.dk>. | |
4263 | |
4264 ;;; Internal Variables: | |
4265 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4266 (defcustom gnus-button-url-regexp "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)" |
17493 | 4267 "Regular expression that matches URLs." |
4268 :group 'gnus-article-buttons | |
4269 :type 'regexp) | |
4270 | |
4271 (defcustom gnus-button-alist | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4272 `(("<\\(url:[>\n\t ]*?\\)?news:[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4273 0 t gnus-button-message-id 2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4274 ("\\bnews:\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t gnus-button-message-id 1) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4275 ("\\(\\b<\\(url:[>\n\t ]*\\)?news:[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4276 1 t |
17493 | 4277 gnus-button-fetch-group 4) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4278 ("\\bnews:\\(//\\)?\\([^'\">\n\t ]+\\)" 0 t gnus-button-fetch-group 2) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4279 ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 |
17493 | 4280 t gnus-button-message-id 3) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4281 ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" 0 t gnus-url-mailto 2) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4282 ("mailto:\\([-a-zA-Z.@_+0-9%]+\\)" 0 t gnus-url-mailto 1) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4283 ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) |
17493 | 4284 ;; This is how URLs _should_ be embedded in text... |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4285 ("<URL: *\\([^<>]*\\)>" 0 t gnus-button-embedded-url 1) |
17493 | 4286 ;; Raw URLs. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4287 (,gnus-button-url-regexp 0 t browse-url 0)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4288 "*Alist of regexps matching buttons in article bodies. |
17493 | 4289 |
4290 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where | |
4291 REGEXP: is the string matching text around the button, | |
4292 BUTTON: is the number of the regexp grouping actually matching the button, | |
4293 FORM: is a lisp expression which must eval to true for the button to | |
4294 be added, | |
4295 CALLBACK: is the function to call when the user push this button, and each | |
4296 PAR: is a number of a regexp grouping whose text will be passed to CALLBACK. | |
4297 | |
4298 CALLBACK can also be a variable, in that case the value of that | |
4299 variable it the real callback function." | |
4300 :group 'gnus-article-buttons | |
4301 :type '(repeat (list regexp | |
4302 (integer :tag "Button") | |
4303 (sexp :tag "Form") | |
4304 (function :tag "Callback") | |
4305 (repeat :tag "Par" | |
4306 :inline t | |
4307 (integer :tag "Regexp group"))))) | |
4308 | |
4309 (defcustom gnus-header-button-alist | |
4310 `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" | |
4311 0 t gnus-button-message-id 0) | |
4312 ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) | |
4313 ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" | |
4314 0 t gnus-button-mailto 0) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4315 ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t browse-url 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4316 ("^Subject:" ,gnus-button-url-regexp 0 t browse-url 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4317 ("^[^:]+:" ,gnus-button-url-regexp 0 t browse-url 0) |
17493 | 4318 ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t |
4319 gnus-button-message-id 3)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4320 "*Alist of headers and regexps to match buttons in article heads. |
17493 | 4321 |
4322 This alist is very similar to `gnus-button-alist', except that each | |
4323 alist has an additional HEADER element first in each entry: | |
4324 | |
4325 \(HEADER REGEXP BUTTON FORM CALLBACK PAR) | |
4326 | |
4327 HEADER is a regexp to match a header. For a fuller explanation, see | |
4328 `gnus-button-alist'." | |
4329 :group 'gnus-article-buttons | |
4330 :group 'gnus-article-headers | |
4331 :type '(repeat (list (regexp :tag "Header") | |
4332 regexp | |
4333 (integer :tag "Button") | |
4334 (sexp :tag "Form") | |
4335 (function :tag "Callback") | |
4336 (repeat :tag "Par" | |
4337 :inline t | |
4338 (integer :tag "Regexp group"))))) | |
4339 | |
4340 (defvar gnus-button-regexp nil) | |
4341 (defvar gnus-button-marker-list nil) | |
4342 ;; Regexp matching any of the regexps from `gnus-button-alist'. | |
4343 | |
4344 (defvar gnus-button-last nil) | |
4345 ;; The value of `gnus-button-alist' when `gnus-button-regexp' was build. | |
4346 | |
4347 ;;; Commands: | |
4348 | |
4349 (defun gnus-article-push-button (event) | |
4350 "Check text under the mouse pointer for a callback function. | |
4351 If the text under the mouse pointer has a `gnus-callback' property, | |
4352 call it with the value of the `gnus-data' text property." | |
4353 (interactive "e") | |
4354 (set-buffer (window-buffer (posn-window (event-start event)))) | |
4355 (let* ((pos (posn-point (event-start event))) | |
4356 (data (get-text-property pos 'gnus-data)) | |
4357 (fun (get-text-property pos 'gnus-callback))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4358 (goto-char pos) |
17493 | 4359 (when fun |
4360 (funcall fun data)))) | |
4361 | |
4362 (defun gnus-article-press-button () | |
4363 "Check text at point for a callback function. | |
4364 If the text at point has a `gnus-callback' property, | |
4365 call it with the value of the `gnus-data' text property." | |
4366 (interactive) | |
4367 (let* ((data (get-text-property (point) 'gnus-data)) | |
4368 (fun (get-text-property (point) 'gnus-callback))) | |
4369 (when fun | |
4370 (funcall fun data)))) | |
4371 | |
4372 (defun gnus-article-highlight (&optional force) | |
4373 "Highlight current article. | |
4374 This function calls `gnus-article-highlight-headers', | |
4375 `gnus-article-highlight-citation', | |
4376 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
4377 do the highlighting. See the documentation for those functions." | |
4378 (interactive (list 'force)) | |
4379 (gnus-article-highlight-headers) | |
4380 (gnus-article-highlight-citation force) | |
4381 (gnus-article-highlight-signature) | |
4382 (gnus-article-add-buttons force) | |
4383 (gnus-article-add-buttons-to-head)) | |
4384 | |
4385 (defun gnus-article-highlight-some (&optional force) | |
4386 "Highlight current article. | |
4387 This function calls `gnus-article-highlight-headers', | |
4388 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
4389 do the highlighting. See the documentation for those functions." | |
4390 (interactive (list 'force)) | |
4391 (gnus-article-highlight-headers) | |
4392 (gnus-article-highlight-signature) | |
4393 (gnus-article-add-buttons)) | |
4394 | |
4395 (defun gnus-article-highlight-headers () | |
4396 "Highlight article headers as specified by `gnus-header-face-alist'." | |
4397 (interactive) | |
4398 (save-excursion | |
4399 (set-buffer gnus-article-buffer) | |
4400 (save-restriction | |
4401 (let ((alist gnus-header-face-alist) | |
4402 (buffer-read-only nil) | |
4403 (case-fold-search t) | |
4404 (inhibit-point-motion-hooks t) | |
4405 entry regexp header-face field-face from hpoints fpoints) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4406 (article-narrow-to-head) |
17493 | 4407 (while (setq entry (pop alist)) |
4408 (goto-char (point-min)) | |
4409 (setq regexp (concat "^\\(" | |
4410 (if (string-equal "" (nth 0 entry)) | |
4411 "[^\t ]" | |
4412 (nth 0 entry)) | |
4413 "\\)") | |
4414 header-face (nth 1 entry) | |
4415 field-face (nth 2 entry)) | |
4416 (while (and (re-search-forward regexp nil t) | |
4417 (not (eobp))) | |
4418 (beginning-of-line) | |
4419 (setq from (point)) | |
4420 (unless (search-forward ":" nil t) | |
4421 (forward-char 1)) | |
4422 (when (and header-face | |
4423 (not (memq (point) hpoints))) | |
4424 (push (point) hpoints) | |
4425 (gnus-put-text-property from (point) 'face header-face)) | |
4426 (when (and field-face | |
4427 (not (memq (setq from (point)) fpoints))) | |
4428 (push from fpoints) | |
4429 (if (re-search-forward "^[^ \t]" nil t) | |
4430 (forward-char -2) | |
4431 (goto-char (point-max))) | |
4432 (gnus-put-text-property from (point) 'face field-face)))))))) | |
4433 | |
4434 (defun gnus-article-highlight-signature () | |
4435 "Highlight the signature in an article. | |
4436 It does this by highlighting everything after | |
4437 `gnus-signature-separator' using `gnus-signature-face'." | |
4438 (interactive) | |
4439 (save-excursion | |
4440 (set-buffer gnus-article-buffer) | |
4441 (let ((buffer-read-only nil) | |
4442 (inhibit-point-motion-hooks t)) | |
4443 (save-restriction | |
4444 (when (and gnus-signature-face | |
4445 (gnus-article-narrow-to-signature)) | |
4446 (gnus-overlay-put (gnus-make-overlay (point-min) (point-max)) | |
4447 'face gnus-signature-face) | |
4448 (widen) | |
4449 (gnus-article-search-signature) | |
4450 (let ((start (match-beginning 0)) | |
4451 (end (set-marker (make-marker) (1+ (match-end 0))))) | |
4452 (gnus-article-add-button start (1- end) 'gnus-signature-toggle | |
4453 end))))))) | |
4454 | |
4455 (defun gnus-button-in-region-p (b e prop) | |
4456 "Say whether PROP exists in the region." | |
4457 (text-property-not-all b e prop nil)) | |
4458 | |
4459 (defun gnus-article-add-buttons (&optional force) | |
4460 "Find external references in the article and make buttons of them. | |
4461 \"External references\" are things like Message-IDs and URLs, as | |
4462 specified by `gnus-button-alist'." | |
4463 (interactive (list 'force)) | |
4464 (save-excursion | |
4465 (set-buffer gnus-article-buffer) | |
4466 (let ((buffer-read-only nil) | |
4467 (inhibit-point-motion-hooks t) | |
4468 (case-fold-search t) | |
4469 (alist gnus-button-alist) | |
4470 beg entry regexp) | |
4471 ;; Remove all old markers. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4472 (let (marker entry new-list) |
17493 | 4473 (while (setq marker (pop gnus-button-marker-list)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4474 (if (or (< marker (point-min)) (>= marker (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4475 (push marker new-list) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4476 (goto-char marker) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4477 (when (setq entry (gnus-button-entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4478 (put-text-property (match-beginning (nth 1 entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4479 (match-end (nth 1 entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4480 'gnus-callback nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4481 (set-marker marker nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4482 (setq gnus-button-marker-list new-list)) |
17493 | 4483 ;; We skip the headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4484 (article-goto-body) |
17493 | 4485 (setq beg (point)) |
4486 (while (setq entry (pop alist)) | |
4487 (setq regexp (car entry)) | |
4488 (goto-char beg) | |
4489 (while (re-search-forward regexp nil t) | |
4490 (let* ((start (and entry (match-beginning (nth 1 entry)))) | |
4491 (end (and entry (match-end (nth 1 entry)))) | |
4492 (from (match-beginning 0))) | |
4493 (when (and (or (eq t (nth 2 entry)) | |
4494 (eval (nth 2 entry))) | |
4495 (not (gnus-button-in-region-p | |
4496 start end 'gnus-callback))) | |
4497 ;; That optional form returned non-nil, so we add the | |
4498 ;; button. | |
4499 (gnus-article-add-button | |
4500 start end 'gnus-button-push | |
4501 (car (push (set-marker (make-marker) from) | |
4502 gnus-button-marker-list)))))))))) | |
4503 | |
4504 ;; Add buttons to the head of an article. | |
4505 (defun gnus-article-add-buttons-to-head () | |
4506 "Add buttons to the head of the article." | |
4507 (interactive) | |
4508 (save-excursion | |
4509 (set-buffer gnus-article-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4510 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4511 (let ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4512 (inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4513 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4514 (alist gnus-header-button-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4515 entry beg end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4516 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4517 (while alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4518 ;; Each alist entry. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4519 (setq entry (car alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4520 alist (cdr alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4521 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4522 (while (re-search-forward (car entry) nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4523 ;; Each header matching the entry. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4524 (setq beg (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4525 (setq end (or (and (re-search-forward "^[^ \t]" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4526 (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4527 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4528 (goto-char beg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4529 (while (re-search-forward (nth 1 entry) end t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4530 ;; Each match within a header. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4531 (let* ((entry (cdr entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4532 (start (match-beginning (nth 1 entry))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4533 (end (match-end (nth 1 entry))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4534 (form (nth 2 entry))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4535 (goto-char (match-end 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4536 (when (eval form) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4537 (gnus-article-add-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4538 start end (nth 3 entry) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4539 (buffer-substring (match-beginning (nth 4 entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4540 (match-end (nth 4 entry))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4541 (goto-char end))))))) |
17493 | 4542 |
4543 ;;; External functions: | |
4544 | |
4545 (defun gnus-article-add-button (from to fun &optional data) | |
4546 "Create a button between FROM and TO with callback FUN and data DATA." | |
4547 (when gnus-article-button-face | |
4548 (gnus-overlay-put (gnus-make-overlay from to) | |
4549 'face gnus-article-button-face)) | |
4550 (gnus-add-text-properties | |
4551 from to | |
4552 (nconc (and gnus-article-mouse-face | |
4553 (list gnus-mouse-face-prop gnus-article-mouse-face)) | |
4554 (list 'gnus-callback fun) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4555 (and data (list 'gnus-data data)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4556 (widget-convert-button 'link from to :action 'gnus-widget-press-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4557 :button-keymap gnus-widget-button-keymap)) |
17493 | 4558 |
4559 ;;; Internal functions: | |
4560 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4561 (defun gnus-article-set-globals () |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4562 (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4563 (set-buffer gnus-summary-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4564 (gnus-set-global-variables))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4565 |
17493 | 4566 (defun gnus-signature-toggle (end) |
4567 (save-excursion | |
4568 (set-buffer gnus-article-buffer) | |
4569 (let ((buffer-read-only nil) | |
4570 (inhibit-point-motion-hooks t)) | |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4571 (if (text-property-any end (point-max) 'article-type 'signature) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4572 (gnus-remove-text-properties-when |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4573 'article-type 'signature end (point-max) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4574 (cons 'article-type (cons 'signature |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4575 gnus-hidden-properties))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4576 (gnus-add-text-properties-when |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4577 'article-type nil end (point-max) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4578 (cons 'article-type (cons 'signature |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4579 gnus-hidden-properties))))))) |
17493 | 4580 |
4581 (defun gnus-button-entry () | |
4582 ;; Return the first entry in `gnus-button-alist' matching this place. | |
4583 (let ((alist gnus-button-alist) | |
4584 (entry nil)) | |
4585 (while alist | |
4586 (setq entry (pop alist)) | |
4587 (if (looking-at (car entry)) | |
4588 (setq alist nil) | |
4589 (setq entry nil))) | |
4590 entry)) | |
4591 | |
4592 (defun gnus-button-push (marker) | |
4593 ;; Push button starting at MARKER. | |
4594 (save-excursion | |
4595 (goto-char marker) | |
4596 (let* ((entry (gnus-button-entry)) | |
4597 (inhibit-point-motion-hooks t) | |
4598 (fun (nth 3 entry)) | |
4599 (args (mapcar (lambda (group) | |
4600 (let ((string (match-string group))) | |
4601 (gnus-set-text-properties | |
4602 0 (length string) nil string) | |
4603 string)) | |
4604 (nthcdr 4 entry)))) | |
4605 (cond | |
4606 ((fboundp fun) | |
4607 (apply fun args)) | |
4608 ((and (boundp fun) | |
4609 (fboundp (symbol-value fun))) | |
4610 (apply (symbol-value fun) args)) | |
4611 (t | |
4612 (gnus-message 1 "You must define `%S' to use this button" | |
4613 (cons fun args))))))) | |
4614 | |
4615 (defun gnus-button-message-id (message-id) | |
4616 "Fetch MESSAGE-ID." | |
4617 (save-excursion | |
4618 (set-buffer gnus-summary-buffer) | |
4619 (gnus-summary-refer-article message-id))) | |
4620 | |
4621 (defun gnus-button-fetch-group (address) | |
4622 "Fetch GROUP specified by ADDRESS." | |
4623 (if (not (string-match "[:/]" address)) | |
4624 ;; This is just a simple group url. | |
4625 (gnus-group-read-ephemeral-group address gnus-select-method) | |
4626 (if (not (string-match "^\\([^:/]+\\)\\(:\\([^/]+\\)/\\)?\\(.*\\)$" | |
4627 address)) | |
4628 (error "Can't parse %s" address) | |
4629 (gnus-group-read-ephemeral-group | |
4630 (match-string 4 address) | |
4631 `(nntp ,(match-string 1 address) | |
4632 (nntp-address ,(match-string 1 address)) | |
4633 (nntp-port-number ,(if (match-end 3) | |
4634 (match-string 3 address) | |
4635 "nntp"))))))) | |
4636 | |
4637 (defun gnus-url-parse-query-string (query &optional downcase) | |
4638 (let (retval pairs cur key val) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4639 (setq pairs (split-string query "&")) |
17493 | 4640 (while pairs |
4641 (setq cur (car pairs) | |
4642 pairs (cdr pairs)) | |
4643 (if (not (string-match "=" cur)) | |
4644 nil ; Grace | |
4645 (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0))) | |
4646 val (gnus-url-unhex-string (substring cur (match-end 0) nil))) | |
4647 (if downcase | |
4648 (setq key (downcase key))) | |
4649 (setq cur (assoc key retval)) | |
4650 (if cur | |
4651 (setcdr cur (cons val (cdr cur))) | |
4652 (setq retval (cons (list key val) retval))))) | |
4653 retval)) | |
4654 | |
4655 (defun gnus-url-unhex (x) | |
4656 (if (> x ?9) | |
4657 (if (>= x ?a) | |
4658 (+ 10 (- x ?a)) | |
4659 (+ 10 (- x ?A))) | |
4660 (- x ?0))) | |
4661 | |
4662 (defun gnus-url-unhex-string (str &optional allow-newlines) | |
4663 "Remove %XXX embedded spaces, etc in a url. | |
4664 If optional second argument ALLOW-NEWLINES is non-nil, then allow the | |
4665 decoding of carriage returns and line feeds in the string, which is normally | |
4666 forbidden in URL encoding." | |
4667 (setq str (or str "")) | |
4668 (let ((tmp "") | |
4669 (case-fold-search t)) | |
4670 (while (string-match "%[0-9a-f][0-9a-f]" str) | |
4671 (let* ((start (match-beginning 0)) | |
4672 (ch1 (gnus-url-unhex (elt str (+ start 1)))) | |
4673 (code (+ (* 16 ch1) | |
4674 (gnus-url-unhex (elt str (+ start 2)))))) | |
4675 (setq tmp (concat | |
4676 tmp (substring str 0 start) | |
4677 (cond | |
4678 (allow-newlines | |
4679 (char-to-string code)) | |
4680 ((or (= code ?\n) (= code ?\r)) | |
4681 " ") | |
4682 (t (char-to-string code)))) | |
4683 str (substring str (match-end 0))))) | |
4684 (setq tmp (concat tmp str)) | |
4685 tmp)) | |
4686 | |
4687 (defun gnus-url-mailto (url) | |
4688 ;; Send mail to someone | |
4689 (when (string-match "mailto:/*\\(.*\\)" url) | |
4690 (setq url (substring url (match-beginning 1) nil))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4691 (let (to args subject func) |
17493 | 4692 (if (string-match (regexp-quote "?") url) |
4693 (setq to (gnus-url-unhex-string (substring url 0 (match-beginning 0))) | |
4694 args (gnus-url-parse-query-string | |
4695 (substring url (match-end 0) nil) t)) | |
4696 (setq to (gnus-url-unhex-string url))) | |
4697 (setq args (cons (list "to" to) args) | |
4698 subject (cdr-safe (assoc "subject" args))) | |
4699 (message-mail) | |
4700 (while args | |
4701 (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) | |
4702 (if (fboundp func) | |
4703 (funcall func) | |
4704 (message-position-on-field (caar args))) | |
4705 (insert (mapconcat 'identity (cdar args) ", ")) | |
4706 (setq args (cdr args))) | |
4707 (if subject | |
4708 (message-goto-body) | |
4709 (message-goto-subject)))) | |
4710 | |
4711 (defun gnus-button-mailto (address) | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4712 "Mail to ADDRESS." |
17493 | 4713 (set-buffer (gnus-copy-article-buffer)) |
4714 (message-reply address)) | |
4715 | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4716 (defalias 'gnus-button-reply 'message-reply) |
17493 | 4717 |
4718 (defun gnus-button-embedded-url (address) | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4719 "Activate ADDRESS with `browse-url'." |
23608
3805e63b8caf
(gnus-button-embedded-url, gnus-button-url):
Dave Love <fx@gnu.org>
parents:
23361
diff
changeset
|
4720 (browse-url (gnus-strip-whitespace address))) |
17493 | 4721 |
4722 ;;; Next/prev buttons in the article buffer. | |
4723 | |
4724 (defvar gnus-next-page-line-format "%{%(Next page...%)%}\n") | |
4725 (defvar gnus-prev-page-line-format "%{%(Previous page...%)%}\n") | |
4726 | |
4727 (defvar gnus-prev-page-map nil) | |
4728 (unless gnus-prev-page-map | |
4729 (setq gnus-prev-page-map (make-sparse-keymap)) | |
4730 (define-key gnus-prev-page-map gnus-mouse-2 'gnus-button-prev-page) | |
4731 (define-key gnus-prev-page-map "\r" 'gnus-button-prev-page)) | |
4732 | |
4733 (defun gnus-insert-prev-page-button () | |
4734 (let ((buffer-read-only nil)) | |
4735 (gnus-eval-format | |
4736 gnus-prev-page-line-format nil | |
4737 `(gnus-prev t local-map ,gnus-prev-page-map | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4738 gnus-callback gnus-article-button-prev-page |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4739 article-type annotation)))) |
17493 | 4740 |
4741 (defvar gnus-next-page-map nil) | |
4742 (unless gnus-next-page-map | |
4743 (setq gnus-next-page-map (make-keymap)) | |
4744 (suppress-keymap gnus-prev-page-map) | |
4745 (define-key gnus-next-page-map gnus-mouse-2 'gnus-button-next-page) | |
4746 (define-key gnus-next-page-map "\r" 'gnus-button-next-page)) | |
4747 | |
4748 (defun gnus-button-next-page () | |
4749 "Go to the next page." | |
4750 (interactive) | |
4751 (let ((win (selected-window))) | |
4752 (select-window (get-buffer-window gnus-article-buffer t)) | |
4753 (gnus-article-next-page) | |
4754 (select-window win))) | |
4755 | |
4756 (defun gnus-button-prev-page () | |
4757 "Go to the prev page." | |
4758 (interactive) | |
4759 (let ((win (selected-window))) | |
4760 (select-window (get-buffer-window gnus-article-buffer t)) | |
4761 (gnus-article-prev-page) | |
4762 (select-window win))) | |
4763 | |
4764 (defun gnus-insert-next-page-button () | |
4765 (let ((buffer-read-only nil)) | |
4766 (gnus-eval-format gnus-next-page-line-format nil | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4767 `(gnus-next |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4768 t local-map ,gnus-next-page-map |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4769 gnus-callback gnus-article-button-next-page |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4770 article-type annotation)))) |
17493 | 4771 |
4772 (defun gnus-article-button-next-page (arg) | |
4773 "Go to the next page." | |
4774 (interactive "P") | |
4775 (let ((win (selected-window))) | |
4776 (select-window (get-buffer-window gnus-article-buffer t)) | |
4777 (gnus-article-next-page) | |
4778 (select-window win))) | |
4779 | |
4780 (defun gnus-article-button-prev-page (arg) | |
4781 "Go to the prev page." | |
4782 (interactive "P") | |
4783 (let ((win (selected-window))) | |
4784 (select-window (get-buffer-window gnus-article-buffer t)) | |
4785 (gnus-article-prev-page) | |
4786 (select-window win))) | |
4787 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4788 (defvar gnus-decode-header-methods |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4789 '(mail-decode-encoded-word-region) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4790 "List of methods used to decode headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4791 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4792 This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4793 is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4794 (REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4795 whose names match REGEXP. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4796 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4797 For example: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4798 ((\"chinese\" . gnus-decode-encoded-word-region-by-guess) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4799 mail-decode-encoded-word-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4800 (\"chinese\" . rfc1843-decode-region)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4801 ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4802 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4803 (defvar gnus-decode-header-methods-cache nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4804 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4805 (defun gnus-multi-decode-header (start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4806 "Apply the functions from `gnus-encoded-word-methods' that match." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4807 (unless (and gnus-decode-header-methods-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4808 (eq gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4809 (car gnus-decode-header-methods-cache))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4810 (setq gnus-decode-header-methods-cache (list gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4811 (mapcar (lambda (x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4812 (if (symbolp x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4813 (nconc gnus-decode-header-methods-cache (list x)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4814 (if (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4815 (string-match (car x) gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4816 (nconc gnus-decode-header-methods-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4817 (list (cdr x)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4818 gnus-decode-header-methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4819 (let ((xlist gnus-decode-header-methods-cache)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4820 (pop xlist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4821 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4822 (narrow-to-region start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4823 (while xlist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4824 (funcall (pop xlist) (point-min) (point-max)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4825 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4826 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4827 ;;; Treatment top-level handling. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4828 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4829 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4830 (defun gnus-treat-article (condition &optional part-number total-parts type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4831 (let ((length (- (point-max) (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4832 (alist gnus-treatment-function-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4833 (article-goto-body-goes-to-point-min-p t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4834 (treated-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4835 (or (not type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4836 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4837 (let ((list gnus-article-treat-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4838 (while list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4839 (when (string-match (pop list) type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4840 (throw 'found t))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4841 (highlightp (gnus-visual-p 'article-highlight 'highlight)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4842 val elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4843 (gnus-run-hooks 'gnus-part-display-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4844 (while (setq elem (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4845 (setq val |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4846 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4847 (if (gnus-buffer-live-p gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4848 (set-buffer gnus-summary-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4849 (symbol-value (car elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4850 (when (and (or (consp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4851 treated-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4852 (gnus-treat-predicate val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4853 (or (not (get (car elem) 'highlight)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4854 highlightp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4855 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4856 (funcall (cadr elem))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4857 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4858 ;; Dynamic variables. |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4859 (eval-when-compile |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4860 (defvar part-number) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4861 (defvar total-parts) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4862 (defvar type) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4863 (defvar condition) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4864 (defvar length)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4865 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4866 (defun gnus-treat-predicate (val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4867 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4868 ((null val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4869 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4870 ((and (listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4871 (stringp (car val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4872 (apply 'gnus-or (mapcar `(lambda (s) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4873 (string-match s ,(or gnus-newsgroup-name ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4874 val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4875 ((listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4876 (let ((pred (pop val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4877 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4878 ((eq pred 'or) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4879 (apply 'gnus-or (mapcar 'gnus-treat-predicate val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4880 ((eq pred 'and) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4881 (apply 'gnus-and (mapcar 'gnus-treat-predicate val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4882 ((eq pred 'not) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4883 (not (gnus-treat-predicate (car val)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4884 ((eq pred 'typep) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4885 (equal (car val) type)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4886 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4887 (error "%S is not a valid predicate" pred))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4888 (condition |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4889 (eq condition val)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4890 ((eq val t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4891 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4892 ((eq val 'head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4893 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4894 ((eq val 'last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4895 (eq part-number total-parts)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4896 ((numberp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4897 (< length val)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4898 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4899 (error "%S is not a valid value" val)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4900 |
17493 | 4901 (gnus-ems-redefine) |
4902 | |
4903 (provide 'gnus-art) | |
4904 | |
4905 (run-hooks 'gnus-art-load-hook) | |
4906 | |
4907 ;;; gnus-art.el ends here |