Mercurial > emacs
annotate lisp/gnus/gnus-art.el @ 54753:86f974440115
*** empty log message ***
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Thu, 08 Apr 2004 03:12:16 +0000 |
parents | 75c387f0b055 |
children | 55fd4f77387a 0fde48feb604 |
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 |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3 ;; Copyright (C) 1996, 97, 98, 1999, 2000, 01, 02, 2004 |
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 |
47569
451b8289e283
* gnus-art.el (gnus-article-x-face-command): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
47540
diff
changeset
|
210 (if (or (and (boundp 'gnus-article-compface-xbm) |
451b8289e283
* gnus-art.el (gnus-article-x-face-command): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
47540
diff
changeset
|
211 gnus-article-compface-xbm) |
451b8289e283
* gnus-art.el (gnus-article-x-face-command): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
47540
diff
changeset
|
212 (eq 0 (string-match "#define" |
451b8289e283
* gnus-art.el (gnus-article-x-face-command): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
47540
diff
changeset
|
213 (shell-command-to-string "uncompface -X")))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
214 "{ 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
|
215 "{ 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
|
216 display -")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
217 "*String or function to be executed to display an X-Face header. |
17493 | 218 If it is a string, the command will be executed in a sub-shell |
219 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
|
220 :type '(choice string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
221 (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
|
222 function) |
35759 | 223 :version "21.1" |
17493 | 224 :group 'gnus-article-washing) |
225 | |
226 (defcustom gnus-article-x-face-too-ugly nil | |
227 "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
|
228 :type '(choice regexp (const nil)) |
17493 | 229 :group 'gnus-article-washing) |
230 | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
231 (defcustom gnus-article-banner-alist nil |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
232 "Banner alist for stripping. |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
233 For example, |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
234 ((egroups . \"^[ \\t\\n]*-------------------+\\\\( eGroups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))" |
33397 | 235 :version "21.1" |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
236 :type '(repeat (cons symbol regexp)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
237 :group 'gnus-article-washing) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
238 |
17493 | 239 (defcustom gnus-emphasis-alist |
240 (let ((format | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
241 "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)") |
17493 | 242 (types |
243 '(("_" "_" underline) | |
244 ("/" "/" italic) | |
245 ("\\*" "\\*" bold) | |
246 ("_/" "/_" underline-italic) | |
247 ("_\\*" "\\*_" underline-bold) | |
248 ("\\*/" "/\\*" bold-italic) | |
249 ("_\\*/" "/\\*_" underline-bold-italic)))) | |
250 `(("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" | |
251 2 3 gnus-emphasis-underline) | |
252 ,@(mapcar | |
253 (lambda (spec) | |
254 (list | |
255 (format format (car spec) (cadr spec)) | |
21486
900aecbf7d38
(gnus-emphasis-alist): Use nth, not caddr.
Karl Heuer <kwzh@gnu.org>
parents:
20119
diff
changeset
|
256 2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) |
17493 | 257 types))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
258 "*Alist that says how to fontify certain phrases. |
17493 | 259 Each item looks like this: |
260 | |
261 (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) | |
262 | |
263 The first element is a regular expression to be matched. The second | |
264 is a number that says what regular expression grouping used to find | |
265 the entire emphasized word. The third is a number that says what | |
266 regexp grouping should be displayed and highlighted. The fourth | |
267 is the face used for highlighting." | |
268 :type '(repeat (list :value ("" 0 0 default) | |
269 regexp | |
270 (integer :tag "Match group") | |
271 (integer :tag "Emphasize group") | |
272 face)) | |
273 :group 'gnus-article-emphasis) | |
274 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
275 (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
|
276 "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
|
277 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
|
278 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
|
279 and the latter avoids underlining any whitespace at all." |
33397 | 280 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
281 :group 'gnus-article-emphasis |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
282 :type 'regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
283 |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
284 (defface gnus-emphasis-bold '((t (:weight bold))) |
17493 | 285 "Face used for displaying strong emphasized text (*word*)." |
286 :group 'gnus-article-emphasis) | |
287 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
288 (defface gnus-emphasis-italic '((t (:slant italic))) |
17493 | 289 "Face used for displaying italic emphasized text (/word/)." |
290 :group 'gnus-article-emphasis) | |
291 | |
292 (defface gnus-emphasis-underline '((t (:underline t))) | |
293 "Face used for displaying underlined emphasized text (_word_)." | |
294 :group 'gnus-article-emphasis) | |
295 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
296 (defface gnus-emphasis-underline-bold '((t (:weight bold :underline t))) |
17493 | 297 "Face used for displaying underlined bold emphasized text (_*word*_)." |
298 :group 'gnus-article-emphasis) | |
299 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
300 (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
|
301 "Face used for displaying underlined italic emphasized text (_/word/_)." |
17493 | 302 :group 'gnus-article-emphasis) |
303 | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
304 (defface gnus-emphasis-bold-italic '((t (:weight bold :slant italic))) |
17493 | 305 "Face used for displaying bold italic emphasized text (/*word*/)." |
306 :group 'gnus-article-emphasis) | |
307 | |
308 (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
|
309 '((t (:weight bold :slant italic :underline t))) |
17493 | 310 "Face used for displaying underlined bold italic emphasized text. |
48588 | 311 Example: (_/*word*/_)." |
17493 | 312 :group 'gnus-article-emphasis) |
313 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
314 (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
|
315 '((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
|
316 "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
|
317 :group 'gnus-article-emphasis) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
318 |
17493 | 319 (defcustom gnus-article-time-format "%a, %b %d %Y %T %Z" |
320 "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
|
321 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
|
322 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
323 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
|
324 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
|
325 be fed to `format-time-string'." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
326 :type '(choice string symbol) |
17493 | 327 :link '(custom-manual "(gnus)Article Date") |
328 :group 'gnus-article-washing) | |
329 | |
330 (eval-and-compile | |
331 (autoload 'mail-extract-address-components "mail-extr")) | |
332 | |
333 (defcustom gnus-save-all-headers t | |
334 "*If non-nil, don't remove any headers before saving." | |
335 :group 'gnus-article-saving | |
336 :type 'boolean) | |
337 | |
338 (defcustom gnus-prompt-before-saving 'always | |
339 "*This variable says how much prompting is to be done when saving articles. | |
340 If it is nil, no prompting will be done, and the articles will be | |
341 saved to the default files. If this variable is `always', each and | |
342 every article that is saved will be preceded by a prompt, even when | |
343 saving large batches of articles. If this variable is neither nil not | |
344 `always', there the user will be prompted once for a file name for | |
345 each invocation of the saving commands." | |
346 :group 'gnus-article-saving | |
347 :type '(choice (item always) | |
348 (item :tag "never" nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
349 (sexp :tag "once" :format "%t\n" :value t))) |
17493 | 350 |
351 (defcustom gnus-saved-headers gnus-visible-headers | |
352 "Headers to keep if `gnus-save-all-headers' is nil. | |
353 If `gnus-save-all-headers' is non-nil, this variable will be ignored. | |
354 If that variable is nil, however, all headers that match this regexp | |
355 will be kept while the rest will be deleted before saving." | |
356 :group 'gnus-article-saving | |
23361
86b5dc6c12f5
(gnus-article-x-face-too-ugly): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
22584
diff
changeset
|
357 :type 'regexp) |
17493 | 358 |
359 (defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail | |
360 "A function to save articles in your favourite format. | |
361 The function must be interactively callable (in other words, it must | |
362 be an Emacs command). | |
363 | |
364 Gnus provides the following functions: | |
365 | |
366 * gnus-summary-save-in-rmail (Rmail format) | |
367 * gnus-summary-save-in-mail (Unix mail format) | |
368 * gnus-summary-save-in-folder (MH folder) | |
369 * gnus-summary-save-in-file (article format) | |
370 * gnus-summary-save-in-vm (use VM's folder format) | |
371 * gnus-summary-write-to-file (article format -- overwrite)." | |
372 :group 'gnus-article-saving | |
373 :type '(radio (function-item gnus-summary-save-in-rmail) | |
374 (function-item gnus-summary-save-in-mail) | |
375 (function-item gnus-summary-save-in-folder) | |
376 (function-item gnus-summary-save-in-file) | |
377 (function-item gnus-summary-save-in-vm) | |
378 (function-item gnus-summary-write-to-file))) | |
379 | |
380 (defcustom gnus-rmail-save-name 'gnus-plain-save-name | |
381 "A function generating a file name to save articles in Rmail format. | |
382 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
383 :group 'gnus-article-saving | |
384 :type 'function) | |
385 | |
386 (defcustom gnus-mail-save-name 'gnus-plain-save-name | |
387 "A function generating a file name to save articles in Unix mail format. | |
388 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
389 :group 'gnus-article-saving | |
390 :type 'function) | |
391 | |
392 (defcustom gnus-folder-save-name 'gnus-folder-save-name | |
393 "A function generating a file name to save articles in MH folder. | |
394 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER." | |
395 :group 'gnus-article-saving | |
396 :type 'function) | |
397 | |
398 (defcustom gnus-file-save-name 'gnus-numeric-save-name | |
399 "A function generating a file name to save articles in article format. | |
400 The function is called with NEWSGROUP, HEADERS, and optional | |
401 LAST-FILE." | |
402 :group 'gnus-article-saving | |
403 :type 'function) | |
404 | |
405 (defcustom gnus-split-methods | |
406 '((gnus-article-archive-name) | |
407 (gnus-article-nndoc-name)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
408 "*Variable used to suggest where articles are to be saved. |
17493 | 409 For instance, if you would like to save articles related to Gnus in |
410 the file \"gnus-stuff\", and articles related to VM in \"vm-stuff\", | |
411 you could set this variable to something like: | |
412 | |
413 '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\") | |
414 (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\")) | |
415 | |
416 This variable is an alist where the where the key is the match and the | |
417 value is a list of possible files to save in if the match is non-nil. | |
418 | |
419 If the match is a string, it is used as a regexp match on the | |
420 article. If the match is a symbol, that symbol will be funcalled | |
421 from the buffer of the article to be saved with the newsgroup as the | |
422 parameter. If it is a list, it will be evaled in the same buffer. | |
423 | |
424 If this form or function returns a string, this string will be used as | |
425 a possible file name; and if it returns a non-nil list, that list will | |
426 be used as possible file names." | |
427 :group 'gnus-article-saving | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
428 :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
|
429 (cons :value ("" "") regexp (repeat string)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
430 (sexp :value nil)))) |
17493 | 431 |
432 (defcustom gnus-page-delimiter "^\^L" | |
433 "*Regexp describing what to use as article page delimiters. | |
434 The default value is \"^\^L\", which is a form linefeed at the | |
435 beginning of a line." | |
436 :type 'regexp | |
437 :group 'gnus-article-various) | |
438 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
439 (defcustom gnus-article-mode-line-format "Gnus: %g [%w] %S%m" |
17493 | 440 "*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
|
441 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
|
442 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
443 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
|
444 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
445 %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
|
446 %m The number of MIME parts in the article." |
17493 | 447 :type 'string |
448 :group 'gnus-article-various) | |
449 | |
450 (defcustom gnus-article-mode-hook nil | |
451 "*A hook for Gnus article mode." | |
452 :type 'hook | |
453 :group 'gnus-article-various) | |
454 | |
455 (defcustom gnus-article-menu-hook nil | |
456 "*Hook run after the creation of the article mode menu." | |
457 :type 'hook | |
458 :group 'gnus-article-various) | |
459 | |
460 (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
|
461 "*A hook called after an article has been prepared in the article buffer." |
17493 | 462 :type 'hook |
463 :group 'gnus-article-various) | |
464 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
465 (defcustom gnus-article-hide-pgp-hook nil |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
466 "*A hook called after successfully hiding a PGP signature." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
467 :type 'hook |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
468 :group 'gnus-article-various) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
469 |
17493 | 470 (defcustom gnus-article-button-face 'bold |
471 "Face used for highlighting buttons in the article buffer. | |
472 | |
473 An article button is a piece of text that you can activate by pressing | |
474 `RET' or `mouse-2' above it." | |
475 :type 'face | |
476 :group 'gnus-article-buttons) | |
477 | |
478 (defcustom gnus-article-mouse-face 'highlight | |
479 "Face used for mouse highlighting in the article buffer. | |
480 | |
481 Article buttons will be displayed in this face when the cursor is | |
482 above them." | |
483 :type 'face | |
484 :group 'gnus-article-buttons) | |
485 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
486 (defcustom gnus-signature-face 'gnus-signature-face |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
487 "Face used for highlighting a signature in the article buffer. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
488 Obsolete; use the face `gnus-signature-face' for customizations instead." |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
489 :type 'face |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
490 :group 'gnus-article-highlight |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
491 :group 'gnus-article-signature) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
492 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
493 (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
|
494 '((t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
495 (:slant italic))) |
17493 | 496 "Face used for highlighting a signature in the article buffer." |
497 :group 'gnus-article-highlight | |
498 :group 'gnus-article-signature) | |
499 | |
500 (defface gnus-header-from-face | |
501 '((((class color) | |
502 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
503 (:foreground "spring green")) |
17493 | 504 (((class color) |
505 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
506 (:foreground "red3")) |
17493 | 507 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
508 (:slant italic))) |
17493 | 509 "Face used for displaying from headers." |
510 :group 'gnus-article-headers | |
511 :group 'gnus-article-highlight) | |
512 | |
513 (defface gnus-header-subject-face | |
514 '((((class color) | |
515 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
516 (:foreground "SeaGreen3")) |
17493 | 517 (((class color) |
518 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
519 (:foreground "red4")) |
17493 | 520 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
521 (:weight bold :slant italic))) |
17493 | 522 "Face used for displaying subject headers." |
523 :group 'gnus-article-headers | |
524 :group 'gnus-article-highlight) | |
525 | |
526 (defface gnus-header-newsgroups-face | |
527 '((((class color) | |
528 (background dark)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
529 (:foreground "yellow" :slant italic)) |
17493 | 530 (((class color) |
531 (background light)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
532 (:foreground "MidnightBlue" :slant italic)) |
17493 | 533 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
534 (:slant italic))) |
17493 | 535 "Face used for displaying newsgroups headers." |
536 :group 'gnus-article-headers | |
537 :group 'gnus-article-highlight) | |
538 | |
539 (defface gnus-header-name-face | |
540 '((((class color) | |
541 (background dark)) | |
542 (:foreground "SeaGreen")) | |
543 (((class color) | |
544 (background light)) | |
545 (:foreground "maroon")) | |
546 (t | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
547 (:weight bold))) |
17493 | 548 "Face used for displaying header names." |
549 :group 'gnus-article-headers | |
550 :group 'gnus-article-highlight) | |
551 | |
552 (defface gnus-header-content-face | |
553 '((((class color) | |
554 (background dark)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
555 (:foreground "forest green" :slant italic)) |
17493 | 556 (((class color) |
557 (background light)) | |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
558 (:foreground "indianred4" :slant italic)) |
17493 | 559 (t |
42475
1e4516b1d514
2002-01-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42206
diff
changeset
|
560 (:slant italic))) "Face used for displaying header content." |
17493 | 561 :group 'gnus-article-headers |
562 :group 'gnus-article-highlight) | |
563 | |
564 (defcustom gnus-header-face-alist | |
565 '(("From" nil gnus-header-from-face) | |
566 ("Subject" nil gnus-header-subject-face) | |
567 ("Newsgroups:.*," nil gnus-header-newsgroups-face) | |
568 ("" 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
|
569 "*Controls highlighting of article header. |
17493 | 570 |
571 An alist of the form (HEADER NAME CONTENT). | |
572 | |
573 HEADER is a regular expression which should match the name of an | |
574 header header and NAME and CONTENT are either face names or nil. | |
575 | |
576 The name of each header field will be displayed using the face | |
577 specified by the first element in the list where HEADER match the | |
578 header name and NAME is non-nil. Similarly, the content will be | |
579 displayed by the first non-nil matching CONTENT face." | |
580 :group 'gnus-article-headers | |
581 :group 'gnus-article-highlight | |
582 :type '(repeat (list (regexp :tag "Header") | |
583 (choice :tag "Name" | |
584 (item :tag "skip" nil) | |
585 (face :value default)) | |
586 (choice :tag "Content" | |
587 (item :tag "skip" nil) | |
588 (face :value default))))) | |
589 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
590 (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
|
591 '(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
|
592 "*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
|
593 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
594 :type 'hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
595 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
596 (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
|
597 "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
|
598 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
599 :type 'function) |
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-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
|
602 "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
|
603 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
604 (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
|
605 '(("\202" ",") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
606 ("\203" "f") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
607 ("\204" ",,") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
608 ("\205" "...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
609 ("\213" "<") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
610 ("\214" "OE") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
611 ("\221" "`") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
612 ("\222" "'") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
613 ("\223" "``") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
614 ("\224" "\"") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
615 ("\225" "*") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
616 ("\226" "-") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
617 ("\227" "--") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
618 ("\231" "(TM)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
619 ("\233" ">") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
620 ("\234" "oe") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
621 ("\264" "'")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
622 "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
|
623 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
624 (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
|
625 "List of MIME types that should be ignored by Gnus." |
33397 | 626 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
627 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
628 :type '(repeat regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
629 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
630 (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
|
631 "List of MIME types that should not be given buttons when rendered inline." |
33397 | 632 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
633 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
634 :type '(repeat regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
635 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
636 (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
|
637 "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
|
638 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
|
639 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
|
640 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
641 :type 'function) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
642 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
643 (defcustom gnus-mime-multipart-functions nil |
33397 | 644 "An alist of MIME types to functions to display them." |
645 :version "21.1" | |
646 :group 'gnus-article-mime | |
647 :type 'alist) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
648 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
649 (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
|
650 "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
|
651 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
|
652 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
|
653 be added below it (otherwise)." |
33397 | 654 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
655 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
656 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
657 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
658 (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
|
659 "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
|
660 This is meant for people who want to view first matched part. |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
661 For `undisplayed-alternative' (default), the first undisplayed |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
662 part or alternative part is used. For `undisplayed', the first |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
663 undisplayed part is used. For a function, the first part which |
50851
629f8ae0c58f
(gnus-article-mime-match-handle-function): Don't quote nil and t in docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
664 the function return t is used. For nil, the first part is |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
665 used." |
33397 | 666 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
667 :group 'gnus-article-mime |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
668 :type '(choice |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
669 (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
|
670 (item :tag "undisplayed" :value undisplayed) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
671 (item :tag "undisplayed or alternative" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
672 :value undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
673 (function))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
674 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
675 (defcustom gnus-mime-action-alist |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
676 '(("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
|
677 ("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
|
678 ("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
|
679 ("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
|
680 ("toggle display" . gnus-article-press-button) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
681 ("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
|
682 ("internalize type" . gnus-mime-internalize-part) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
683 ("externalize type" . gnus-mime-externalize-part)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
684 "An alist of actions that run on the MIME attachment." |
33397 | 685 :version "21.1" |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
686 :group 'gnus-article-mime |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
687 :type '(repeat (cons (string :tag "name") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
688 (function)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
689 |
31716
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 ;;; The treatment variables |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
692 ;;; |
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-part-display-hook nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
695 "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
|
696 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
697 (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
|
698 '(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
|
699 (const :tag "On" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
700 (const :tag "Header" head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
701 (const :tag "Last" last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
702 (integer :tag "Less") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
703 (repeat :tag "Groups" regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
704 (sexp :tag "Predicate"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
705 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
706 (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
|
707 '(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
|
708 (const :tag "Header" head))) |
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-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
|
711 "Parts to treat.") |
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 (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
|
714 "Whether to inhibit treatment.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
715 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
716 (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
|
717 "Highlight the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
718 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
|
719 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
|
720 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
721 :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
|
722 (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
|
723 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
724 (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
|
725 "Add buttons. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
726 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
|
727 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
|
728 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
729 :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
|
730 (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
|
731 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
732 (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
|
733 "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
|
734 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
|
735 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
|
736 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
737 :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
|
738 (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
|
739 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
740 (defcustom gnus-treat-emphasize |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
741 (and (or window-system |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
742 (featurep 'xemacs) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
743 (>= (string-to-number emacs-version) 21)) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
744 50000) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
745 "Emphasize text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
746 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
|
747 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
|
748 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
749 :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
|
750 (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
|
751 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
752 (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
|
753 "Remove carriage returns. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
754 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
|
755 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
|
756 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
757 :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
|
758 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
759 (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
|
760 "Hide headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
761 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
|
762 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
|
763 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
764 :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
|
765 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
766 (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
|
767 "Hide boring headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
768 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
|
769 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
|
770 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
771 :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
|
772 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
773 (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
|
774 "Hide the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
775 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
|
776 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
|
777 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
778 :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
|
779 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
780 (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
|
781 "Fill the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
782 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
|
783 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
|
784 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
785 :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
|
786 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
787 (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
|
788 "Hide cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
789 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
|
790 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
|
791 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
792 :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
|
793 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
794 (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
|
795 "Hide cited text. |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
796 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
|
797 See the manual for details." |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
798 :group 'gnus-article-treat |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
799 :type gnus-article-treat-custom) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
800 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
801 (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
|
802 "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
|
803 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
|
804 See the manual for details." |
33397 | 805 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
806 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
807 :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
|
808 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
809 (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
|
810 "Strip PGP signatures. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
811 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
|
812 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
|
813 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
814 :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
|
815 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
816 (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
|
817 "Strip PEM signatures. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
818 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
|
819 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
|
820 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
821 :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
|
822 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
823 (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
|
824 "Strip banners from articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
825 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
|
826 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
|
827 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
|
828 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
829 :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
|
830 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
831 (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
|
832 "Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
833 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
|
834 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
|
835 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
836 :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
|
837 (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
|
838 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
839 (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
|
840 "Highlight cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
841 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
|
842 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
|
843 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
844 :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
|
845 (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
|
846 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
847 (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
|
848 "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
|
849 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
|
850 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
|
851 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
852 :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
|
853 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
854 (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
|
855 "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
|
856 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
|
857 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
|
858 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
859 :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
|
860 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
861 (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
|
862 "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
|
863 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
|
864 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
|
865 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
866 :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
|
867 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
868 (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
|
869 "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
|
870 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
|
871 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
|
872 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
873 :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
|
874 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
875 (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
|
876 "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
|
877 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
|
878 See the manual for details." |
33397 | 879 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
880 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
881 :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
|
882 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
883 (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
|
884 "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
|
885 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
|
886 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
|
887 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
|
888 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
889 :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
|
890 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
891 (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
|
892 "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
|
893 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
|
894 See the manual for details." |
33397 | 895 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
896 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
897 :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
|
898 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
899 (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
|
900 "Strip trailing blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
901 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
|
902 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
|
903 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
904 :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
|
905 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
906 (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
|
907 "Strip leading blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
908 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
|
909 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
|
910 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
911 :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
|
912 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
913 (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
|
914 "Strip multiple blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
915 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
|
916 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
|
917 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
918 :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
|
919 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
920 (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
|
921 "Treat overstrike highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
922 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
|
923 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
|
924 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
925 :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
|
926 (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
|
927 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
928 (defcustom gnus-treat-display-xface |
31785 | 929 (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
|
930 (image-type-available-p 'xbm) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
931 (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
|
932 (and (featurep 'xemacs) (featurep 'xface))) |
31785 | 933 'head) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
934 "Display X-Face headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
935 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
|
936 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
|
937 :group 'gnus-article-treat |
35759 | 938 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
939 :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
|
940 (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
|
941 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
942 (defcustom gnus-treat-display-smileys |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
943 (if (or (and (featurep 'xemacs) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
944 (featurep 'xpm)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
945 (and (fboundp 'image-type-available-p) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
946 (image-type-available-p 'pbm))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
947 t nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
948 "Display smileys. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
949 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
|
950 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
|
951 :group 'gnus-article-treat |
35759 | 952 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
953 :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
|
954 (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
|
955 |
32939
c8119677d63e
Use (featurep 'xemacs) instead of the `gnus-xemacs' variable, as the
Miles Bader <miles@gnu.org>
parents:
32927
diff
changeset
|
956 (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
|
957 "Display picons. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
958 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
|
959 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
|
960 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
961 :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
|
962 (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
|
963 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
964 (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
|
965 "Capitalize sentence-starting words. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
966 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
|
967 See the manual for details." |
33397 | 968 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
969 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
970 :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
|
971 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
972 (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
|
973 "Fill long lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
974 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
|
975 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
|
976 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
977 :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
|
978 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
979 (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
|
980 "Play sounds. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
981 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
|
982 See the manual for details." |
33397 | 983 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
984 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
985 :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
|
986 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
987 (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
|
988 "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
|
989 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
|
990 See the manual for details." |
33397 | 991 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
992 :group 'gnus-article-treat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
993 :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
|
994 |
17493 | 995 ;;; Internal variables |
996 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
997 (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
|
998 (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
|
999 (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
|
1000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1001 (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
|
1002 (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
|
1003 '((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
|
1004 (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
|
1005 (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
|
1006 (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
|
1007 (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
|
1008 (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
|
1009 (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
|
1010 (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
|
1011 (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
|
1012 (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
|
1013 (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
|
1014 (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
|
1015 (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
|
1016 (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
|
1017 (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
|
1018 (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
|
1019 (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
|
1020 (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
|
1021 (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
|
1022 (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
|
1023 (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
|
1024 (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
|
1025 (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
|
1026 (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
|
1027 (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
|
1028 (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
|
1029 (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
|
1030 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
|
1031 (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
|
1032 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
|
1033 (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
|
1034 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
|
1035 (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
|
1036 (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
|
1037 (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
|
1038 (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
|
1039 (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
|
1040 (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
|
1041 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1042 (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
|
1043 (defvar article-lapsed-timer nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1044 (defvar gnus-article-current-summary nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1045 |
17493 | 1046 (defvar gnus-article-mode-syntax-table |
1047 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
1048 (modify-syntax-entry ?- "w" table) | |
1049 (modify-syntax-entry ?> ")" table) | |
1050 (modify-syntax-entry ?< "(" table) | |
1051 table) | |
1052 "Syntax table used in article mode buffers. | |
1053 Initialized from `text-mode-syntax-table.") | |
1054 | |
1055 (defvar gnus-save-article-buffer nil) | |
1056 | |
1057 (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
|
1058 (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
|
1059 (?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
|
1060 gnus-summary-mode-line-format-alist)) |
17493 | 1061 |
1062 (defvar gnus-number-of-articles-to-be-saved nil) | |
1063 | |
1064 (defvar gnus-inhibit-hiding nil) | |
1065 | |
1066 (defsubst gnus-article-hide-text (b e props) | |
1067 "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
|
1068 (gnus-add-text-properties-when 'article-type nil b e props) |
17493 | 1069 (when (memq 'intangible props) |
1070 (put-text-property | |
1071 (max (1- b) (point-min)) | |
1072 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
|
1073 |
17493 | 1074 (defsubst gnus-article-unhide-text (b e) |
1075 "Remove hidden text properties from region between B and E." | |
1076 (remove-text-properties b e gnus-hidden-properties) | |
1077 (when (memq 'intangible gnus-hidden-properties) | |
1078 (put-text-property (max (1- b) (point-min)) | |
1079 b 'intangible nil))) | |
1080 | |
1081 (defun gnus-article-hide-text-type (b e type) | |
1082 "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
|
1083 (push type gnus-article-wash-types) |
17493 | 1084 (gnus-article-hide-text |
1085 b e (cons 'article-type (cons type gnus-hidden-properties)))) | |
1086 | |
1087 (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
|
1088 "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
|
1089 (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
|
1090 (delq type gnus-article-wash-types)) |
17493 | 1091 (remove-text-properties |
1092 b e (cons 'article-type (cons type gnus-hidden-properties))) | |
1093 (when (memq 'intangible gnus-hidden-properties) | |
1094 (put-text-property (max (1- b) (point-min)) | |
1095 b 'intangible nil))) | |
1096 | |
1097 (defun gnus-article-hide-text-of-type (type) | |
1098 "Hide text of TYPE in the current buffer." | |
1099 (save-excursion | |
1100 (let ((b (point-min)) | |
1101 (e (point-max))) | |
1102 (while (setq b (text-property-any b e 'article-type type)) | |
1103 (add-text-properties b (incf b) gnus-hidden-properties))))) | |
1104 | |
1105 (defun gnus-article-delete-text-of-type (type) | |
1106 "Delete text of TYPE in the current buffer." | |
1107 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1108 (let ((b (point-min))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1109 (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
|
1110 (delete-region |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1111 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
|
1112 (point-max))))))) |
17493 | 1113 |
1114 (defun gnus-article-delete-invisible-text () | |
1115 "Delete all invisible text in the current buffer." | |
1116 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1117 (let ((b (point-min))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1118 (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
|
1119 (delete-region |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1120 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
|
1121 (point-max))))))) |
17493 | 1122 |
1123 (defun gnus-article-text-type-exists-p (type) | |
1124 "Say whether any text of type TYPE exists in the buffer." | |
1125 (text-property-any (point-min) (point-max) 'article-type type)) | |
1126 | |
1127 (defsubst gnus-article-header-rank () | |
1128 "Give the rank of the string HEADER as given by `gnus-sorted-header-list'." | |
1129 (let ((list gnus-sorted-header-list) | |
1130 (i 0)) | |
1131 (while list | |
1132 (when (looking-at (car list)) | |
1133 (setq list nil)) | |
1134 (setq list (cdr list)) | |
1135 (incf i)) | |
1136 i)) | |
1137 | |
1138 (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
|
1139 "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
|
1140 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1141 ;; 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
|
1142 (unless gnus-inhibit-hiding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1143 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1144 (save-restriction |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1145 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1146 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1147 (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
|
1148 (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
|
1149 (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
|
1150 gnus-ignored-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1151 ((listp gnus-ignored-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1152 (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
|
1153 "\\|"))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1154 (visible |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1155 (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
|
1156 gnus-visible-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1157 ((and gnus-visible-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1158 (listp gnus-visible-headers)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1159 (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
|
1160 (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
|
1161 beg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1162 ;; 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
|
1163 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1164 ;; 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
|
1165 (while (looking-at "From ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1166 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1167 (unless (bobp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1168 (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
|
1169 ;; 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
|
1170 ;; 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
|
1171 ;; `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
|
1172 ;; 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
|
1173 ;; article buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1174 (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
|
1175 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1176 ;; 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
|
1177 (put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1178 (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
|
1179 (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
|
1180 (and ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1181 (not (looking-at ignored)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1182 (gnus-article-header-rank) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1183 (+ 2 max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1184 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1185 (message-sort-headers-1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1186 (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
|
1187 (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
|
1188 ;; 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
|
1189 (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
|
1190 (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
|
1191 '(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
|
1192 (delete-region beg (point-max)))))))) |
17493 | 1193 |
1194 (defun article-hide-boring-headers (&optional arg) | |
1195 "Toggle hiding of headers that aren't very interesting. | |
1196 If given a negative prefix, always show; if given a positive prefix, | |
1197 always hide." | |
1198 (interactive (gnus-article-hidden-arg)) | |
1199 (when (and (not (gnus-article-check-hidden-text 'boring-headers arg)) | |
1200 (not gnus-show-all-headers)) | |
1201 (save-excursion | |
1202 (save-restriction | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1203 (let ((inhibit-read-only t) |
17493 | 1204 (list gnus-boring-article-headers) |
1205 (inhibit-point-motion-hooks t) | |
1206 elem) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1207 (article-narrow-to-head) |
17493 | 1208 (while list |
1209 (setq elem (pop list)) | |
1210 (goto-char (point-min)) | |
1211 (cond | |
1212 ;; Hide empty headers. | |
1213 ((eq elem 'empty) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1214 (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) |
17493 | 1215 (forward-line -1) |
1216 (gnus-article-hide-text-type | |
1217 (progn (beginning-of-line) (point)) | |
1218 (progn | |
1219 (end-of-line) | |
1220 (if (re-search-forward "^[^ \t]" nil t) | |
1221 (match-beginning 0) | |
1222 (point-max))) | |
1223 'boring-headers))) | |
1224 ;; Hide boring Newsgroups header. | |
1225 ((eq elem 'newsgroups) | |
1226 (when (equal (gnus-fetch-field "newsgroups") | |
1227 (gnus-group-real-name | |
1228 (if (boundp 'gnus-newsgroup-name) | |
1229 gnus-newsgroup-name | |
1230 ""))) | |
1231 (gnus-article-hide-header "newsgroups"))) | |
1232 ((eq elem 'followup-to) | |
1233 (when (equal (message-fetch-field "followup-to") | |
1234 (message-fetch-field "newsgroups")) | |
1235 (gnus-article-hide-header "followup-to"))) | |
1236 ((eq elem 'reply-to) | |
1237 (let ((from (message-fetch-field "from")) | |
1238 (reply-to (message-fetch-field "reply-to"))) | |
1239 (when (and | |
1240 from reply-to | |
1241 (ignore-errors | |
1242 (equal | |
1243 (nth 1 (mail-extract-address-components from)) | |
1244 (nth 1 (mail-extract-address-components reply-to))))) | |
1245 (gnus-article-hide-header "reply-to")))) | |
1246 ((eq elem 'date) | |
1247 (let ((date (message-fetch-field "date"))) | |
1248 (when (and date | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1249 (< (days-between (current-time-string) date) |
17493 | 1250 4)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1251 (gnus-article-hide-header "date")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1252 ((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
|
1253 (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
|
1254 (cc (message-fetch-field "cc"))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1255 (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
|
1256 (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
|
1257 (when (> (length cc) 1024) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1258 (gnus-article-hide-header "cc")))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1259 ((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
|
1260 (let ((to-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1261 (cc-count 0)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1262 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1263 (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
|
1264 (setq to-count (1+ to-count))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1265 (when (> to-count 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1266 (while (> to-count 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1267 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1268 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1269 (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
|
1270 (forward-line -1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1271 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1272 (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
|
1273 (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
|
1274 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1275 (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
|
1276 (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
|
1277 (when (> cc-count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1278 (while (> cc-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1279 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1280 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1281 (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
|
1282 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1283 (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
|
1284 (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
|
1285 (setq cc-count (1- cc-count))))))))))))) |
17493 | 1286 |
1287 (defun gnus-article-hide-header (header) | |
1288 (save-excursion | |
1289 (goto-char (point-min)) | |
1290 (when (re-search-forward (concat "^" header ":") nil t) | |
1291 (gnus-article-hide-text-type | |
1292 (progn (beginning-of-line) (point)) | |
1293 (progn | |
1294 (end-of-line) | |
1295 (if (re-search-forward "^[^ \t]" nil t) | |
1296 (match-beginning 0) | |
1297 (point-max))) | |
1298 'boring-headers)))) | |
1299 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1300 (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
|
1301 "Length of normalized headers.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1302 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1303 (defun article-normalize-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1304 "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
|
1305 (interactive) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1306 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1307 column) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1308 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1309 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1310 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1311 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1312 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1313 ((< (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
|
1314 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
|
1315 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1316 (insert (make-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1317 (- 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
|
1318 ? ))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1319 ((> 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
|
1320 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1321 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1322 (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
|
1323 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1324 (gnus-point-at-eol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1325 'invisible t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1326 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1327 ;; Do nothing. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1328 )) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1329 (forward-line 1)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1330 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1331 (defun article-treat-dumbquotes () |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1332 "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
|
1333 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
|
1334 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
|
1335 |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
1336 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
|
1337 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
|
1338 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
|
1339 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
|
1340 (interactive) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1341 (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
|
1342 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1343 (defun article-translate-characters (from to) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1344 "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
|
1345 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
|
1346 characters to translate to." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1347 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1348 (when (article-goto-body) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1349 (let ((inhibit-read-only t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1350 (x (make-string 225 ?x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1351 (i -1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1352 (while (< (incf i) (length x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1353 (aset x i i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1354 (setq i 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1355 (while (< i (length from)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1356 (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
|
1357 (incf i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1358 (translate-region (point) (point-max) x))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1359 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1360 (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
|
1361 "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
|
1362 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
|
1363 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1364 (when (article-goto-body) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1365 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1366 elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1367 (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
|
1368 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1369 (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
|
1370 (replace-match (cadr elem))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1371 |
17493 | 1372 (defun article-treat-overstrike () |
1373 "Translate overstrikes into bold text." | |
1374 (interactive) | |
1375 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1376 (when (article-goto-body) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1377 (let ((inhibit-read-only t)) |
17493 | 1378 (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
|
1379 (let ((next (char-after)) |
17493 | 1380 (previous (char-after (- (point) 2)))) |
1381 ;; We do the boldification/underlining by hiding the | |
1382 ;; overstrikes and putting the proper text property | |
1383 ;; on the letters. | |
1384 (cond | |
1385 ((eq next previous) | |
1386 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1387 (put-text-property (point) (1+ (point)) 'face 'bold)) | |
1388 ((eq next ?_) | |
1389 (gnus-article-hide-text-type | |
1390 (1- (point)) (1+ (point)) 'overstrike) | |
1391 (put-text-property | |
1392 (- (point) 2) (1- (point)) 'face 'underline)) | |
1393 ((eq previous ?_) | |
1394 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1395 (put-text-property | |
1396 (point) (1+ (point)) 'face 'underline))))))))) | |
1397 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1398 (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
|
1399 "Fill lines that are wider than the window width." |
17493 | 1400 (interactive) |
1401 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1402 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1403 (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
|
1404 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1405 (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
|
1406 (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
|
1407 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1408 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1409 (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
|
1410 (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
|
1411 (fill-paragraph nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1412 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1413 (widen)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1414 (forward-line 1))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1415 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1416 (defun article-capitalize-sentences () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1417 "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
|
1418 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1419 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1420 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1421 (paragraph-start "^[\n\^L]")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1422 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1423 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1424 (capitalize-word 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1425 (forward-sentence))))) |
17493 | 1426 |
1427 (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
|
1428 "Remove trailing CRs and then translate remaining CRs into LFs." |
17493 | 1429 (interactive) |
1430 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1431 (let ((inhibit-read-only t)) |
17493 | 1432 (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
|
1433 (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
|
1434 (replace-match "" t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1435 (goto-char (point-min)) |
17493 | 1436 (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
|
1437 (replace-match "\n" t t))))) |
17493 | 1438 |
1439 (defun article-remove-trailing-blank-lines () | |
1440 "Remove all trailing blank lines from the article." | |
1441 (interactive) | |
1442 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1443 (let ((inhibit-read-only t)) |
17493 | 1444 (goto-char (point-max)) |
1445 (delete-region | |
1446 (point) | |
1447 (progn | |
1448 (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
|
1449 (looking-at "^[ \t]*$") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1450 (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
|
1451 (point) (gnus-point-at-eol)))) |
17493 | 1452 (forward-line -1)) |
1453 (forward-line 1) | |
1454 (point)))))) | |
1455 | |
1456 (defun article-display-x-face (&optional force) | |
1457 "Look for an X-Face header and display it if present." | |
1458 (interactive (list 'force)) | |
1459 (save-excursion | |
1460 ;; Delete the old process, if any. | |
1461 (when (process-status "article-x-face") | |
1462 (delete-process "article-x-face")) | |
1463 (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
|
1464 (case-fold-search t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1465 from last) |
17493 | 1466 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1467 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1468 (goto-char (point-min)) |
17493 | 1469 (setq from (message-fetch-field "from")) |
1470 (goto-char (point-min)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1471 (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
|
1472 (not last) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1473 (or force |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1474 ;; Check whether this face is censored. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1475 (not gnus-article-x-face-too-ugly) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1476 (and gnus-article-x-face-too-ugly from |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1477 (not (string-match gnus-article-x-face-too-ugly |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1478 from)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1479 ;; Has to be present. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1480 (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
|
1481 ;; 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
|
1482 ;; `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
|
1483 ;; 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
|
1484 ;; multiple faces really something to encourage? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1485 (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
|
1486 (setq last t)) |
17493 | 1487 ;; 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
|
1488 (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1489 (let ((beg (point)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1490 (end (1- (re-search-forward "^\\($\\|[^ \t]\\)" nil t)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1491 ;; We display the face. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1492 (if (symbolp gnus-article-x-face-command) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1493 ;; The command is a lisp function, so we call it. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1494 (if (gnus-functionp gnus-article-x-face-command) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1495 (funcall gnus-article-x-face-command beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1496 (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
|
1497 ;; The command is a string, so we interpret the command |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1498 ;; as a, well, command, and fork it off. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1499 (let ((process-connection-type nil)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1500 (process-kill-without-query |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1501 (start-process |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1502 "article-x-face" nil shell-file-name shell-command-switch |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1503 gnus-article-x-face-command)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1504 (process-send-region "article-x-face" beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1505 (process-send-eof "article-x-face")))))))))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1506 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1507 (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
|
1508 "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
|
1509 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1510 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1511 (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
|
1512 (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
|
1513 buffer-read-only |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1514 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1515 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1516 (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
|
1517 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1518 (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
|
1519 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1520 (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
|
1521 "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
|
1522 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
|
1523 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1524 (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
|
1525 buffer-read-only |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1526 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1527 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1528 (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
|
1529 (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
|
1530 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1531 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1532 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
|
1533 (save-excursion |
17493 | 1534 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1535 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1536 (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
|
1537 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
|
1538 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
|
1539 (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
|
1540 charset (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1541 (prompt |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1542 (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
|
1543 (ctl |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1544 (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
|
1545 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
|
1546 (when cte |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1547 (setq cte (mail-header-strip cte))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1548 (if (and ctl (not (string-match "/" (car ctl)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1549 (setq ctl nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1550 (goto-char (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1551 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1552 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1553 (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
|
1554 (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
|
1555 (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
|
1556 ;; 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
|
1557 (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
|
1558 (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
|
1559 (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
|
1560 (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
|
1561 (mm-decode-body |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1562 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
|
1563 (gnus-strip-whitespace cte)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1564 (car ctl))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1565 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1566 (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
|
1567 "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
|
1568 (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
|
1569 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1570 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1571 (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
|
1572 (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
|
1573 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1574 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1575 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1576 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1577 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1578 (funcall gnus-decode-header-function (point-min) (point-max))))) |
17493 | 1579 |
1580 (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
|
1581 "Translate a quoted-printable-encoded article. |
17493 | 1582 If FORCE, decode the article whether it is marked as quoted-printable |
1583 or not." | |
1584 (interactive (list 'force)) | |
1585 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1586 (let ((inhibit-read-only t) type charset) |
31785 | 1587 (if (gnus-buffer-live-p gnus-original-article-buffer) |
1588 (with-current-buffer gnus-original-article-buffer | |
1589 (setq type | |
1590 (gnus-fetch-field "content-transfer-encoding")) | |
1591 (let* ((ct (gnus-fetch-field "content-type")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1592 (ctl (and ct |
31785 | 1593 (ignore-errors |
1594 (mail-header-parse-content-type ct))))) | |
1595 (setq charset (and ctl | |
1596 (mail-content-type-get ctl 'charset))) | |
1597 (if (stringp charset) | |
1598 (setq charset (intern (downcase charset))))))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1599 (unless charset |
31785 | 1600 (setq charset gnus-newsgroup-charset)) |
17493 | 1601 (when (or force |
32210 | 1602 (and type (let ((case-fold-search t)) |
1603 (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
|
1604 (article-goto-body) |
32210 | 1605 (quoted-printable-decode-region |
1606 (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
|
1607 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1608 (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
|
1609 "Translate a base64 article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1610 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
|
1611 (interactive (list 'force)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1612 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1613 (let ((inhibit-read-only t) type charset) |
31785 | 1614 (if (gnus-buffer-live-p gnus-original-article-buffer) |
1615 (with-current-buffer gnus-original-article-buffer | |
1616 (setq type | |
1617 (gnus-fetch-field "content-transfer-encoding")) | |
1618 (let* ((ct (gnus-fetch-field "content-type")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1619 (ctl (and ct |
31785 | 1620 (ignore-errors |
1621 (mail-header-parse-content-type ct))))) | |
1622 (setq charset (and ctl | |
1623 (mail-content-type-get ctl 'charset))) | |
1624 (if (stringp charset) | |
1625 (setq charset (intern (downcase charset))))))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1626 (unless charset |
31785 | 1627 (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
|
1628 (when (or force |
32210 | 1629 (and type (let ((case-fold-search t)) |
1630 (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
|
1631 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1632 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1633 (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
|
1634 (base64-decode-region (point-min) (point-max)) |
32210 | 1635 (mm-decode-coding-region |
1636 (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
|
1637 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1638 (eval-when-compile |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1639 (require 'rfc1843)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1640 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1641 (defun article-decode-HZ () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1642 "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
|
1643 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1644 (require 'rfc1843) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1645 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1646 (let ((inhibit-read-only t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1647 (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
|
1648 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1649 (defun article-wash-html () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1650 "Format an html article." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1651 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1652 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1653 (let ((inhibit-read-only t) |
31785 | 1654 charset) |
1655 (if (gnus-buffer-live-p gnus-original-article-buffer) | |
1656 (with-current-buffer gnus-original-article-buffer | |
1657 (let* ((ct (gnus-fetch-field "content-type")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1658 (ctl (and ct |
31785 | 1659 (ignore-errors |
1660 (mail-header-parse-content-type ct))))) | |
1661 (setq charset (and ctl | |
1662 (mail-content-type-get ctl 'charset))) | |
1663 (if (stringp charset) | |
1664 (setq charset (intern (downcase charset))))))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1665 (unless charset |
31785 | 1666 (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
|
1667 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1668 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1669 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1670 (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
|
1671 (mm-setup-w3) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1672 (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
|
1673 (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
|
1674 (url-standalone-mode t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1675 (condition-case var |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1676 (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
|
1677 (error)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1678 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1679 (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
|
1680 "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
|
1681 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
|
1682 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1683 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1684 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1685 (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
|
1686 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1687 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1688 (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
|
1689 (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
|
1690 (when regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1691 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1692 (when (re-search-forward |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1693 (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1694 " *\\)\\)+\\(Re: +\\)?\\)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1695 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1696 (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
|
1697 (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
|
1698 (when s |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1699 (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
|
1700 (insert s)))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1701 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1702 (defun article-hide-pgp () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1703 "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
|
1704 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1705 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1706 (save-restriction |
17493 | 1707 (let ((inhibit-point-motion-hooks t) |
1708 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
|
1709 (article-goto-body) |
17493 | 1710 ;; Hide the "header". |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1711 (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
|
1712 (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
|
1713 (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
|
1714 ;; 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
|
1715 (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
|
1716 (point))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1717 (setq beg (point)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1718 ;; Hide the actual signature. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1719 (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1720 (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
|
1721 (delete-region |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1722 end |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1723 (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1724 (match-end 0) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1725 ;; 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
|
1726 ;; 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
|
1727 (point-max)))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1728 ;; Hide "- " PGP quotation markers. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1729 (when (and beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1730 (narrow-to-region beg end) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1731 (goto-char (point-min)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1732 (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
|
1733 (delete-region |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1734 (match-beginning 0) (match-end 0))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1735 (widen)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1736 (gnus-run-hooks 'gnus-article-hide-pgp-hook)))))) |
17493 | 1737 |
1738 (defun article-hide-pem (&optional arg) | |
1739 "Toggle hiding of any PEM headers and signatures in the current article. | |
1740 If given a negative prefix, always show; if given a positive prefix, | |
1741 always hide." | |
1742 (interactive (gnus-article-hidden-arg)) | |
1743 (unless (gnus-article-check-hidden-text 'pem arg) | |
1744 (save-excursion | |
1745 (let (buffer-read-only end) | |
1746 (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
|
1747 ;; 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
|
1748 (when (and (search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1749 "\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
|
1750 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1751 (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
|
1752 (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
|
1753 (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
|
1754 end |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1755 (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
|
1756 (match-end 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1757 (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1758 'pem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1759 ;; 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
|
1760 (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
|
1761 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1762 (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
|
1763 (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
|
1764 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1765 (defun article-strip-banner () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1766 "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
|
1767 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1768 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1769 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1770 (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
|
1771 (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
|
1772 (gnus-signature-limit nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1773 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
|
1774 (when banner |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1775 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1776 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1777 ((eq banner 'signature) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1778 (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
|
1779 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1780 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1781 (delete-region (point) (point-max)))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1782 ((symbolp banner) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1783 (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
|
1784 (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
|
1785 (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
|
1786 ((stringp banner) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1787 (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
|
1788 (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
|
1789 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1790 (defun article-babel () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1791 "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
|
1792 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1793 (require 'babel) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1794 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1795 (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
|
1796 (when (article-goto-body) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1797 (let* ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1798 (start (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1799 (end (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1800 (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
|
1801 (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
|
1802 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1803 (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
|
1804 (delete-region start end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1805 (insert trans)))))) |
17493 | 1806 |
1807 (defun article-hide-signature (&optional arg) | |
1808 "Hide the signature in the current article. | |
1809 If given a negative prefix, always show; if given a positive prefix, | |
1810 always hide." | |
1811 (interactive (gnus-article-hidden-arg)) | |
1812 (unless (gnus-article-check-hidden-text 'signature arg) | |
1813 (save-excursion | |
1814 (save-restriction | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1815 (let ((inhibit-read-only t)) |
17493 | 1816 (when (gnus-article-narrow-to-signature) |
1817 (gnus-article-hide-text-type | |
1818 (point-min) (point-max) 'signature))))))) | |
1819 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1820 (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
|
1821 "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
|
1822 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1823 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1824 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1825 (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
|
1826 (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
|
1827 (gnus-delete-line))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1828 |
17493 | 1829 (defun article-strip-leading-blank-lines () |
1830 "Remove all blank lines from the beginning of the article." | |
1831 (interactive) | |
1832 (save-excursion | |
1833 (let ((inhibit-point-motion-hooks t) | |
1834 buffer-read-only) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1835 (when (article-goto-body) |
17493 | 1836 (while (and (not (eobp)) |
1837 (looking-at "[ \t]*$")) | |
1838 (gnus-delete-line)))))) | |
1839 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1840 (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
|
1841 "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
|
1842 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
|
1843 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1844 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1845 (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
|
1846 (1- (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1847 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1848 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1849 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1850 (defun article-goto-body () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1851 "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
|
1852 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1853 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1854 ;; 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
|
1855 ;; MIME body parts. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1856 (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
|
1857 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1858 ((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
|
1859 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1860 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1861 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1862 nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1863 |
17493 | 1864 (defun article-strip-multiple-blank-lines () |
1865 "Replace consecutive blank lines with one empty line." | |
1866 (interactive) | |
1867 (save-excursion | |
1868 (let ((inhibit-point-motion-hooks t) | |
1869 buffer-read-only) | |
1870 ;; 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
|
1871 (article-goto-body) |
17493 | 1872 (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
|
1873 (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
|
1874 (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
|
1875 (replace-match "" nil t))) |
17493 | 1876 ;; 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
|
1877 (article-goto-body) |
17493 | 1878 (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
|
1879 (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
|
1880 (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
|
1881 (replace-match "\n\n" t t)))))) |
17493 | 1882 |
1883 (defun article-strip-leading-space () | |
1884 "Remove all white space from the beginning of the lines in the article." | |
1885 (interactive) | |
1886 (save-excursion | |
1887 (let ((inhibit-point-motion-hooks t) | |
1888 buffer-read-only) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1889 (article-goto-body) |
17493 | 1890 (while (re-search-forward "^[ \t]+" nil t) |
1891 (replace-match "" t t))))) | |
1892 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1893 (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
|
1894 "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
|
1895 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1896 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1897 (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
|
1898 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1899 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1900 (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
|
1901 (replace-match "" t t))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1902 |
17493 | 1903 (defun article-strip-blank-lines () |
1904 "Strip leading, trailing and multiple blank lines." | |
1905 (interactive) | |
1906 (article-strip-leading-blank-lines) | |
1907 (article-remove-trailing-blank-lines) | |
1908 (article-strip-multiple-blank-lines)) | |
1909 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1910 (defun article-strip-all-blank-lines () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1911 "Strip all blank lines." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1912 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1913 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1914 (let ((inhibit-point-motion-hooks t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1915 buffer-read-only) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1916 (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1917 (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
|
1918 (replace-match "" t t))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1919 |
17493 | 1920 (defun gnus-article-narrow-to-signature () |
1921 "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
|
1922 (let ((inhibit-point-motion-hooks t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1923 (when (gnus-article-search-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1924 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1925 ;; 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
|
1926 ;; to be a signature. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1927 (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
|
1928 (list gnus-signature-limit))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1929 limit limited) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1930 (while (setq limit (pop limits)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1931 (if (or (and (integerp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1932 (< (- (point-max) (point)) limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1933 (and (floatp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1934 (< (count-lines (point) (point-max)) limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1935 (and (gnus-functionp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1936 (funcall limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1937 (and (stringp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1938 (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
|
1939 () ; This limit did not succeed. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1940 (setq limited t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1941 limits nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1942 (unless limited |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1943 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1944 t))))) |
17493 | 1945 |
1946 (defun gnus-article-search-signature () | |
1947 "Search the current buffer for the signature separator. | |
1948 Put point at the beginning of the signature separator." | |
1949 (let ((cur (point))) | |
1950 (goto-char (point-max)) | |
1951 (if (if (stringp gnus-signature-separator) | |
1952 (re-search-backward gnus-signature-separator nil t) | |
1953 (let ((seps gnus-signature-separator)) | |
1954 (while (and seps | |
1955 (not (re-search-backward (car seps) nil t))) | |
1956 (pop seps)) | |
1957 seps)) | |
1958 t | |
1959 (goto-char cur) | |
1960 nil))) | |
1961 | |
1962 (defun gnus-article-hidden-arg () | |
1963 "Return the current prefix arg as a number, or 0 if no prefix." | |
1964 (list (if current-prefix-arg | |
1965 (prefix-numeric-value current-prefix-arg) | |
1966 0))) | |
1967 | |
1968 (defun gnus-article-check-hidden-text (type arg) | |
1969 "Return nil if hiding is necessary. | |
42206 | 1970 Arg can be nil or a number. nil and positive means hide, negative |
17493 | 1971 means show, 0 means toggle." |
1972 (save-excursion | |
1973 (save-restriction | |
1974 (let ((hide (gnus-article-hidden-text-p type))) | |
1975 (cond | |
1976 ((or (null arg) | |
1977 (> arg 0)) | |
1978 nil) | |
1979 ((< arg 0) | |
34833
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1980 (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
|
1981 t) |
17493 | 1982 (t |
1983 (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
|
1984 (progn |
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
1985 (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
|
1986 t) |
17493 | 1987 nil))))))) |
1988 | |
1989 (defun gnus-article-hidden-text-p (type) | |
1990 "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
|
1991 (let ((pos (text-property-any (point-min) (point-max) 'article-type type))) |
17493 | 1992 (while (and pos |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1993 (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
|
1994 (not (get-text-property pos 'dummy-invisible))) |
17493 | 1995 (setq pos |
1996 (text-property-any (1+ pos) (point-max) 'article-type type))) | |
1997 (if pos | |
1998 'hidden | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1999 nil))) |
17493 | 2000 |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2001 (defun gnus-article-show-hidden-text (type &optional dummy) |
17493 | 2002 "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
|
2003 Originally it is hide instead of DUMMY." |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2004 (let ((inhibit-read-only t) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2005 (inhibit-point-motion-hooks t)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2006 (gnus-remove-text-properties-when |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2007 'article-type type |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2008 (point-min) (point-max) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2009 (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
|
2010 gnus-hidden-properties))))) |
17493 | 2011 |
2012 (defconst article-time-units | |
2013 `((year . ,(* 365.25 24 60 60)) | |
2014 (week . ,(* 7 24 60 60)) | |
2015 (day . ,(* 24 60 60)) | |
2016 (hour . ,(* 60 60)) | |
2017 (minute . 60) | |
2018 (second . 1)) | |
2019 "Mapping from time units to seconds.") | |
2020 | |
2021 (defun article-date-ut (&optional type highlight header) | |
2022 "Convert DATE date to universal time in the current article. | |
2023 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
|
2024 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
|
2025 `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
|
2026 should replace the \"Date:\" one, or should be added below it." |
17493 | 2027 (interactive (list 'ut t)) |
2028 (let* ((header (or header | |
2029 (message-fetch-field "date") | |
2030 "")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2031 (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
|
2032 (date-regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2033 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2034 ((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
|
2035 tdate-regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2036 ((eq type 'lapsed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2037 "^X-Sent:[ \t]") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2038 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2039 "^Date:[ \t]"))) |
17493 | 2040 (date (if (vectorp header) (mail-header-date header) |
2041 header)) | |
2042 (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
|
2043 pos |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2044 bface eface) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2045 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2046 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2047 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2048 (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
|
2049 (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
|
2050 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
|
2051 'original-date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2052 date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2053 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
|
2054 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2055 (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
|
2056 (goto-char (point-min)) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2057 (let ((inhibit-read-only t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2058 ;; 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
|
2059 (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
|
2060 (if pos |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2061 (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
|
2062 (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
|
2063 (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
|
2064 (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
|
2065 (setq pos (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2066 (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
|
2067 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2068 (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
|
2069 (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
|
2070 (when (not pos) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2071 (insert "\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2072 (forward-line -1)) |
17493 | 2073 ;; Do highlighting. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2074 (beginning-of-line) |
17493 | 2075 (when (looking-at "\\([^:]+\\): *\\(.*\\)$") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2076 (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
|
2077 'original-date date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2078 (put-text-property (match-beginning 1) (1+ (match-end 1)) |
17493 | 2079 'face bface) |
2080 (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
|
2081 'face eface)))))))) |
17493 | 2082 |
2083 (defun article-make-date-line (date type) | |
2084 "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
|
2085 (let ((time (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2086 (date-to-time date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2087 (error '(0 0))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2088 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2089 ;; 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
|
2090 ;; `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
|
2091 ;; 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
|
2092 ;; buggy dates. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2093 ((eq type 'local) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2094 (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
|
2095 (format "Date: %s %s%02d%02d" (current-time-string time) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2096 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2097 (/ (% (abs tz) 3600) 60)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2098 ;; Convert to Universal Time. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2099 ((eq type 'ut) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2100 (concat "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2101 (current-time-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2102 (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
|
2103 (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
|
2104 (ms (car tm)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2105 (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
|
2106 (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
|
2107 ((> 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
|
2108 (t (list ms ls))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2109 " UT")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2110 ;; 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
|
2111 ((eq type 'original) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2112 (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
|
2113 (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
|
2114 date))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2115 ;; 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
|
2116 ((eq type 'user) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2117 (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
|
2118 (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
|
2119 (concat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2120 "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2121 (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
|
2122 ;; ISO 8601. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2123 ((eq type 'iso8601) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2124 (let ((tz (car (current-time-zone time)))) |
17493 | 2125 (concat |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2126 "Date: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2127 (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
|
2128 (format "%s%02d%02d" |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2129 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2130 (/ (% (abs tz) 3600) 60))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2131 ;; 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
|
2132 ((eq type 'lapsed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2133 ;; 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
|
2134 ;; 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
|
2135 (let* ((now (current-time)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2136 (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
|
2137 (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
|
2138 (+ (* (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
|
2139 (cadr real-time)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2140 (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
|
2141 num prev) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2142 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2143 ((null real-time) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2144 "X-Sent: Unknown") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2145 ((zerop sec) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2146 "X-Sent: Now") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2147 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2148 (concat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2149 "X-Sent: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2150 ;; 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
|
2151 ;; 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
|
2152 ;; 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
|
2153 ;; in positive answers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2154 (mapconcat |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2155 (lambda (unit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2156 (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
|
2157 ;; 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
|
2158 ;; 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
|
2159 "" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2160 ;; 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
|
2161 (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
|
2162 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2163 (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
|
2164 (floor num)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2165 " " (symbol-name (car unit)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2166 (if (> num 1) "s" "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2167 (setq prev t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2168 article-time-units "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2169 ;; 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
|
2170 ;; 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
|
2171 (if (> real-sec 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2172 " ago" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2173 " in the future")))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2174 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2175 (error "Unknown conversion type: %s" type))))) |
17493 | 2176 |
2177 (defun article-date-local (&optional highlight) | |
2178 "Convert the current article date to the local timezone." | |
2179 (interactive (list t)) | |
2180 (article-date-ut 'local highlight)) | |
2181 | |
2182 (defun article-date-original (&optional highlight) | |
2183 "Convert the current article date to what it was originally. | |
2184 This is only useful if you have used some other date conversion | |
2185 function and want to see what the date was before converting." | |
2186 (interactive (list t)) | |
2187 (article-date-ut 'original highlight)) | |
2188 | |
2189 (defun article-date-lapsed (&optional highlight) | |
2190 "Convert the current article date to time lapsed since it was sent." | |
2191 (interactive (list t)) | |
2192 (article-date-ut 'lapsed highlight)) | |
2193 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2194 (defun article-update-date-lapsed () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2195 "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
|
2196 (let (deactivate-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2197 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2198 (ignore-errors |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2199 (walk-windows |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2200 (lambda (w) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2201 (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
|
2202 (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
|
2203 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2204 (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
|
2205 (article-date-lapsed t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2206 nil 'visible))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2207 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2208 (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
|
2209 "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
|
2210 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
|
2211 is to run." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2212 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2213 (unless n |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2214 (setq n 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2215 (gnus-stop-date-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2216 (setq article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2217 (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
|
2218 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2219 (defun gnus-stop-date-timer () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2220 "Stop the X-Sent timer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2221 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2222 (when article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2223 (nnheader-cancel-timer article-lapsed-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2224 (setq article-lapsed-timer nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2225 |
17493 | 2226 (defun article-date-user (&optional highlight) |
2227 "Convert the current article date to the user-defined format. | |
2228 This format is defined by the `gnus-article-time-format' variable." | |
2229 (interactive (list t)) | |
2230 (article-date-ut 'user highlight)) | |
2231 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2232 (defun article-date-iso8601 (&optional highlight) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2233 "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
|
2234 (interactive (list t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2235 (article-date-ut 'iso8601 highlight)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2236 |
17493 | 2237 (defun article-show-all () |
2238 "Show all hidden text in the article buffer." | |
2239 (interactive) | |
2240 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2241 (let ((inhibit-read-only t)) |
17493 | 2242 (gnus-article-unhide-text (point-min) (point-max))))) |
2243 | |
2244 (defun article-emphasize (&optional arg) | |
2245 "Emphasize text according to `gnus-emphasis-alist'." | |
2246 (interactive (gnus-article-hidden-arg)) | |
2247 (unless (gnus-article-check-hidden-text 'emphasis arg) | |
2248 (save-excursion | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2249 (let ((alist (or |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2250 (condition-case nil |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2251 (with-current-buffer gnus-summary-buffer |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2252 gnus-article-emphasis-alist) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2253 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2254 gnus-emphasis-alist)) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2255 (inhibit-read-only t) |
17493 | 2256 (props (append '(article-type emphasis) |
2257 gnus-hidden-properties)) | |
2258 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
|
2259 (article-goto-body) |
17493 | 2260 (setq beg (point)) |
2261 (while (setq elem (pop alist)) | |
2262 (goto-char beg) | |
2263 (setq regexp (car elem) | |
2264 invisible (nth 1 elem) | |
2265 visible (nth 2 elem) | |
2266 face (nth 3 elem)) | |
2267 (while (re-search-forward regexp nil t) | |
2268 (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
|
2269 (push 'emphasis gnus-article-wash-types) |
17493 | 2270 (gnus-article-hide-text |
2271 (match-beginning invisible) (match-end invisible) props) | |
2272 (gnus-article-unhide-text-type | |
2273 (match-beginning visible) (match-end visible) 'emphasis) | |
2274 (gnus-put-text-property-excluding-newlines | |
2275 (match-beginning visible) (match-end visible) 'face face) | |
2276 (goto-char (match-end invisible))))))))) | |
2277 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2278 (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
|
2279 "Setup newsgroup emphasis alist." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2280 (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
|
2281 (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
|
2282 (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
|
2283 (make-local-variable 'gnus-article-emphasis-alist) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2284 (setq gnus-article-emphasis-alist |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2285 (nconc |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2286 (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
|
2287 (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
|
2288 (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
|
2289 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2290 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
|
2291 highlight) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2292 (copy-sequence highlight-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2293 (if gnus-newsgroup-name |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2294 (copy-sequence (gnus-group-find-parameter |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2295 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
|
2296 gnus-emphasis-alist))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2297 |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2298 (eval-when-compile |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2299 (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
|
2300 (defvar gnus-summary-post-menu)) |
17493 | 2301 |
2302 ;;; Saving functions. | |
2303 | |
2304 (defun gnus-article-save (save-buffer file &optional num) | |
2305 "Save the currently selected article." | |
2306 (unless gnus-save-all-headers | |
2307 ;; Remove headers according to `gnus-saved-headers'. | |
2308 (let ((gnus-visible-headers | |
2309 (or gnus-saved-headers gnus-visible-headers)) | |
2310 (gnus-article-buffer save-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2311 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2312 (set-buffer save-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2313 (article-hide-headers 1 t)))) |
17493 | 2314 (save-window-excursion |
2315 (if (not gnus-default-article-saver) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2316 (error "No default saver is defined") |
17493 | 2317 ;; !!! 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
|
2318 ;; `gnus-save-article-buffer' (or so they think), but we |
17493 | 2319 ;; bind that variable to our save-buffer. |
2320 (set-buffer gnus-article-buffer) | |
2321 (let* ((gnus-save-article-buffer save-buffer) | |
2322 (filename | |
2323 (cond | |
2324 ((not gnus-prompt-before-saving) 'default) | |
2325 ((eq gnus-prompt-before-saving 'always) nil) | |
2326 (t file))) | |
2327 (gnus-number-of-articles-to-be-saved | |
2328 (when (eq gnus-prompt-before-saving t) | |
2329 num))) ; Magic | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2330 (set-buffer gnus-article-current-summary) |
17493 | 2331 (funcall gnus-default-article-saver filename))))) |
2332 | |
2333 (defun gnus-read-save-file-name (prompt &optional filename | |
2334 function group headers variable) | |
2335 (let ((default-name | |
2336 (funcall function group headers (symbol-value variable))) | |
2337 result) | |
33077 | 2338 (setq result |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2339 (expand-file-name |
33077 | 2340 (cond |
2341 ((eq filename 'default) | |
2342 default-name) | |
2343 ((eq filename t) | |
2344 default-name) | |
2345 (filename filename) | |
2346 (t | |
2347 (let* ((split-name (gnus-get-split-value gnus-split-methods)) | |
2348 (prompt | |
2349 (format prompt | |
2350 (if (and gnus-number-of-articles-to-be-saved | |
2351 (> gnus-number-of-articles-to-be-saved 1)) | |
2352 (format "these %d articles" | |
2353 gnus-number-of-articles-to-be-saved) | |
2354 "this article"))) | |
2355 (file | |
2356 ;; Let the split methods have their say. | |
2357 (cond | |
2358 ;; No split name was found. | |
2359 ((null split-name) | |
2360 (read-file-name | |
2361 (concat prompt " (default " | |
2362 (file-name-nondirectory default-name) ") ") | |
2363 (file-name-directory default-name) | |
2364 default-name)) | |
2365 ;; A single group name is returned. | |
2366 ((stringp split-name) | |
2367 (setq default-name | |
2368 (funcall function split-name headers | |
2369 (symbol-value variable))) | |
2370 (read-file-name | |
2371 (concat prompt " (default " | |
2372 (file-name-nondirectory default-name) ") ") | |
2373 (file-name-directory default-name) | |
2374 default-name)) | |
2375 ;; A single split name was found | |
2376 ((= 1 (length split-name)) | |
2377 (let* ((name (expand-file-name | |
2378 (car split-name) gnus-article-save-directory)) | |
2379 (dir (cond ((file-directory-p name) | |
2380 (file-name-as-directory name)) | |
2381 ((file-exists-p name) name) | |
2382 (t gnus-article-save-directory)))) | |
2383 (read-file-name | |
2384 (concat prompt " (default " name ") ") | |
2385 dir name))) | |
2386 ;; A list of splits was found. | |
2387 (t | |
2388 (setq split-name (nreverse split-name)) | |
2389 (let (result) | |
2390 (let ((file-name-history | |
2391 (nconc split-name file-name-history))) | |
2392 (setq result | |
2393 (expand-file-name | |
2394 (read-file-name | |
2395 (concat prompt " (`M-p' for defaults) ") | |
2396 gnus-article-save-directory | |
2397 (car split-name)) | |
2398 gnus-article-save-directory))) | |
2399 (car (push result file-name-history))))))) | |
2400 ;; Create the directory. | |
2401 (gnus-make-directory (file-name-directory file)) | |
2402 ;; If we have read a directory, we append the default file name. | |
2403 (when (file-directory-p file) | |
2404 (setq file (expand-file-name (file-name-nondirectory default-name) | |
2405 (file-name-as-directory file)))) | |
2406 ;; Possibly translate some characters. | |
2407 (nnheader-translate-file-chars file)))))) | |
17493 | 2408 (gnus-make-directory (file-name-directory result)) |
2409 (set variable result))) | |
2410 | |
2411 (defun gnus-article-archive-name (group) | |
2412 "Return the first instance of an \"Archive-name\" in the current buffer." | |
2413 (let ((case-fold-search t)) | |
2414 (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) | |
2415 (nnheader-concat gnus-article-save-directory | |
2416 (match-string 1))))) | |
2417 | |
2418 (defun gnus-article-nndoc-name (group) | |
2419 "If GROUP is an nndoc group, return the name of the parent group." | |
2420 (when (eq (car (gnus-find-method-for-group group)) 'nndoc) | |
2421 (gnus-group-get-parameter group 'save-article-group))) | |
2422 | |
2423 (defun gnus-summary-save-in-rmail (&optional filename) | |
2424 "Append this article to Rmail file. | |
2425 Optional argument FILENAME specifies file name. | |
2426 Directory to save to is default to `gnus-article-save-directory'." | |
2427 (setq filename (gnus-read-save-file-name | |
2428 "Save %s in rmail file:" filename | |
2429 gnus-rmail-save-name gnus-newsgroup-name | |
2430 gnus-current-headers 'gnus-newsgroup-last-rmail)) | |
2431 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2432 (save-excursion | |
2433 (save-restriction | |
2434 (widen) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2435 (gnus-output-to-rmail filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2436 filename) |
17493 | 2437 |
2438 (defun gnus-summary-save-in-mail (&optional filename) | |
2439 "Append this article to Unix mail file. | |
2440 Optional argument FILENAME specifies file name. | |
2441 Directory to save to is default to `gnus-article-save-directory'." | |
2442 (setq filename (gnus-read-save-file-name | |
2443 "Save %s in Unix mail file:" filename | |
2444 gnus-mail-save-name gnus-newsgroup-name | |
2445 gnus-current-headers 'gnus-newsgroup-last-mail)) | |
2446 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2447 (save-excursion | |
2448 (save-restriction | |
2449 (widen) | |
2450 (if (and (file-readable-p filename) | |
2451 (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
|
2452 (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
|
2453 (gnus-output-to-mail filename))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2454 filename) |
17493 | 2455 |
2456 (defun gnus-summary-save-in-file (&optional filename overwrite) | |
2457 "Append this article to file. | |
2458 Optional argument FILENAME specifies file name. | |
2459 Directory to save to is default to `gnus-article-save-directory'." | |
2460 (setq filename (gnus-read-save-file-name | |
2461 "Save %s in file:" filename | |
2462 gnus-file-save-name gnus-newsgroup-name | |
2463 gnus-current-headers 'gnus-newsgroup-last-file)) | |
2464 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2465 (save-excursion | |
2466 (save-restriction | |
2467 (widen) | |
2468 (when (and overwrite | |
2469 (file-exists-p filename)) | |
2470 (delete-file filename)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2471 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2472 filename) |
17493 | 2473 |
2474 (defun gnus-summary-write-to-file (&optional filename) | |
2475 "Write this article to a file. | |
2476 Optional argument FILENAME specifies file name. | |
2477 The directory to save in defaults to `gnus-article-save-directory'." | |
2478 (gnus-summary-save-in-file nil t)) | |
2479 | |
2480 (defun gnus-summary-save-body-in-file (&optional filename) | |
2481 "Append this article body to a file. | |
2482 Optional argument FILENAME specifies file name. | |
2483 The directory to save in defaults to `gnus-article-save-directory'." | |
2484 (setq filename (gnus-read-save-file-name | |
2485 "Save %s body in file:" filename | |
2486 gnus-file-save-name gnus-newsgroup-name | |
2487 gnus-current-headers 'gnus-newsgroup-last-file)) | |
2488 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
2489 (save-excursion | |
2490 (save-restriction | |
2491 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2492 (when (article-goto-body) |
17493 | 2493 (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
|
2494 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2495 filename) |
17493 | 2496 |
2497 (defun gnus-summary-save-in-pipe (&optional command) | |
2498 "Pipe this article to subprocess." | |
2499 (setq command | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2500 (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
|
2501 gnus-last-shell-command) |
17493 | 2502 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
|
2503 ((stringp command) |
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
2504 command) |
17493 | 2505 (t (read-string |
2506 (format | |
2507 "Shell command on %s: " | |
2508 (if (and gnus-number-of-articles-to-be-saved | |
2509 (> gnus-number-of-articles-to-be-saved 1)) | |
2510 (format "these %d articles" | |
2511 gnus-number-of-articles-to-be-saved) | |
2512 "this article")) | |
2513 gnus-last-shell-command)))) | |
2514 (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
|
2515 (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
|
2516 (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
|
2517 (error "A command is required"))) |
17493 | 2518 (gnus-eval-in-buffer-window gnus-article-buffer |
2519 (save-restriction | |
2520 (widen) | |
2521 (shell-command-on-region (point-min) (point-max) command nil))) | |
2522 (setq gnus-last-shell-command command)) | |
2523 | |
2524 ;;; Article file names when saving. | |
2525 | |
2526 (defun gnus-capitalize-newsgroup (newsgroup) | |
2527 "Capitalize NEWSGROUP name." | |
2528 (when (not (zerop (length newsgroup))) | |
2529 (concat (char-to-string (upcase (aref newsgroup 0))) | |
2530 (substring newsgroup 1)))) | |
2531 | |
2532 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) | |
2533 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2534 If variable `gnus-use-long-file-name' is non-nil, it is ~/News/News.group/num. | |
2535 Otherwise, it is like ~/News/news/group/num." | |
2536 (let ((default | |
2537 (expand-file-name | |
2538 (concat (if (gnus-use-long-file-name 'not-save) | |
2539 (gnus-capitalize-newsgroup newsgroup) | |
2540 (gnus-newsgroup-directory-form newsgroup)) | |
2541 "/" (int-to-string (mail-header-number headers))) | |
2542 gnus-article-save-directory))) | |
2543 (if (and last-file | |
2544 (string-equal (file-name-directory default) | |
2545 (file-name-directory last-file)) | |
2546 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
2547 default | |
2548 (or last-file default)))) | |
2549 | |
2550 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
2551 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2552 If variable `gnus-use-long-file-name' is non-nil, it is | |
2553 ~/News/news.group/num. Otherwise, it is like ~/News/news/group/num." | |
2554 (let ((default | |
2555 (expand-file-name | |
2556 (concat (if (gnus-use-long-file-name 'not-save) | |
2557 newsgroup | |
2558 (gnus-newsgroup-directory-form newsgroup)) | |
2559 "/" (int-to-string (mail-header-number headers))) | |
2560 gnus-article-save-directory))) | |
2561 (if (and last-file | |
2562 (string-equal (file-name-directory default) | |
2563 (file-name-directory last-file)) | |
2564 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
2565 default | |
2566 (or last-file default)))) | |
2567 | |
2568 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
2569 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
2570 If variable `gnus-use-long-file-name' is non-nil, it is | |
2571 ~/News/news.group. Otherwise, it is like ~/News/news/group/news." | |
2572 (or last-file | |
2573 (expand-file-name | |
2574 (if (gnus-use-long-file-name 'not-save) | |
2575 newsgroup | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2576 (expand-file-name "news" (gnus-newsgroup-directory-form newsgroup))) |
17493 | 2577 gnus-article-save-directory))) |
2578 | |
2579 (eval-and-compile | |
2580 (mapcar | |
2581 (lambda (func) | |
2582 (let (afunc gfunc) | |
2583 (if (consp func) | |
2584 (setq afunc (car func) | |
2585 gfunc (cdr func)) | |
2586 (setq afunc func | |
2587 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
|
2588 (defalias gfunc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2589 (if (fboundp afunc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2590 `(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
|
2591 ,(documentation afunc t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2592 (interactive (list t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2593 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2594 (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
|
2595 (if interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2596 (call-interactively ',afunc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2597 (apply ',afunc args)))))))) |
17493 | 2598 '(article-hide-headers |
2599 article-hide-boring-headers | |
2600 article-treat-overstrike | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2601 article-fill-long-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2602 article-capitalize-sentences |
17493 | 2603 article-remove-cr |
2604 article-display-x-face | |
2605 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
|
2606 article-de-base64-unreadable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2607 article-decode-HZ |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2608 article-wash-html |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2609 article-hide-list-identifiers |
17493 | 2610 article-hide-pgp |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2611 article-strip-banner |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2612 article-babel |
17493 | 2613 article-hide-pem |
2614 article-hide-signature | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2615 article-strip-headers-in-body |
17493 | 2616 article-remove-trailing-blank-lines |
2617 article-strip-leading-blank-lines | |
2618 article-strip-multiple-blank-lines | |
2619 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
|
2620 article-strip-trailing-space |
17493 | 2621 article-strip-blank-lines |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2622 article-strip-all-blank-lines |
17493 | 2623 article-date-local |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2624 article-date-iso8601 |
17493 | 2625 article-date-original |
2626 article-date-ut | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2627 article-decode-mime-words |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2628 article-decode-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2629 article-decode-encoded-words |
17493 | 2630 article-date-user |
2631 article-date-lapsed | |
2632 article-emphasize | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2633 article-treat-dumbquotes |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2634 article-normalize-headers |
17493 | 2635 (article-show-all . gnus-article-show-all-headers)))) |
2636 | |
2637 ;;; | |
2638 ;;; Gnus article mode | |
2639 ;;; | |
2640 | |
2641 (put 'gnus-article-mode 'mode-class 'special) | |
2642 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2643 (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
|
2644 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2645 (gnus-define-keys gnus-article-mode-map |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2646 " " gnus-article-goto-next-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2647 "\177" gnus-article-goto-prev-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2648 [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
|
2649 [backspace] gnus-article-goto-prev-page |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2650 "\C-c^" gnus-article-refer-article |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2651 "h" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2652 "s" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2653 "\C-c\C-m" gnus-article-mail |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2654 "?" 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
|
2655 "e" gnus-summary-edit-article |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2656 "<" beginning-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2657 ">" end-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2658 "\C-c\C-i" gnus-info-find-node |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2659 "\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
|
2660 "\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
|
2661 "\C-hc" gnus-article-describe-key-briefly |
17493 | 2662 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2663 "\C-d" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2664 "\M-*" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2665 "\M-#" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2666 "\M-^" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2667 "\M-g" gnus-article-read-summary-keys) |
17493 | 2668 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2669 (substitute-key-definition |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2670 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) |
17493 | 2671 |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2672 (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
|
2673 |
17493 | 2674 (defun gnus-article-make-menu-bar () |
2675 (gnus-turn-off-edit-menu 'article) | |
2676 (unless (boundp 'gnus-article-article-menu) | |
2677 (easy-menu-define | |
2678 gnus-article-article-menu gnus-article-mode-map "" | |
2679 '("Article" | |
2680 ["Scroll forwards" gnus-article-goto-next-page t] | |
2681 ["Scroll backwards" gnus-article-goto-prev-page t] | |
2682 ["Show summary" gnus-article-show-summary t] | |
2683 ["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
|
2684 ["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
|
2685 ["Send a bug report" gnus-bug t])) |
17493 | 2686 |
2687 (easy-menu-define | |
2688 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
|
2689 ;; Fixme: this should use :active (and maybe :visible). |
17493 | 2690 '("Treatment" |
2691 ["Hide headers" gnus-article-hide-headers t] | |
2692 ["Hide signature" gnus-article-hide-signature t] | |
2693 ["Hide citation" gnus-article-hide-citation t] | |
2694 ["Treat overstrike" gnus-article-treat-overstrike t] | |
2695 ["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
|
2696 ["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
|
2697 ["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
|
2698 ["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
|
2699 ["Decode HZ" gnus-article-decode-HZ t])) |
17493 | 2700 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2701 ;; Note "Commands" menu is defined in gnus-sum.el for consistency |
17493 | 2702 |
2703 (when (boundp 'gnus-summary-post-menu) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2704 (cond |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
2705 ((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
|
2706 (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
|
2707 ((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
|
2708 ;; 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
|
2709 (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
|
2710 (copy-keymap gnus-summary-post-menu)))) |
17493 | 2711 (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
|
2712 (cons "Post" gnus-article-post-menu))) |
17493 | 2713 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2714 (gnus-run-hooks 'gnus-article-menu-hook))) |
17493 | 2715 |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2716 ;; 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
|
2717 ;; Summary. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2718 |
17493 | 2719 (defun gnus-article-mode () |
2720 "Major mode for displaying an article. | |
2721 | |
2722 All normal editing commands are switched off. | |
2723 | |
2724 The following commands are available in addition to all summary mode | |
2725 commands: | |
2726 \\<gnus-article-mode-map> | |
2727 \\[gnus-article-next-page]\t Scroll the article one page forwards | |
2728 \\[gnus-article-prev-page]\t Scroll the article one page backwards | |
2729 \\[gnus-article-refer-article]\t Go to the article referred to by an article id near point | |
2730 \\[gnus-article-show-summary]\t Display the summary buffer | |
2731 \\[gnus-article-mail]\t Send a reply to the address near point | |
2732 \\[gnus-article-describe-briefly]\t Describe the current mode briefly | |
2733 \\[gnus-info-find-node]\t Go to the Gnus info node" | |
2734 (interactive) | |
2735 (gnus-simplify-mode-line) | |
2736 (setq mode-name "Article") | |
2737 (setq major-mode 'gnus-article-mode) | |
2738 (make-local-variable 'minor-mode-alist) | |
2739 (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
|
2740 (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
|
2741 (gnus-article-make-menu-bar)) |
17493 | 2742 (gnus-update-format-specifications nil 'article-mode) |
2743 (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
|
2744 (make-local-variable 'gnus-page-broken) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2745 (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
|
2746 (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
|
2747 (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
|
2748 (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
|
2749 (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
|
2750 (make-local-variable 'gnus-article-wash-types) |
17493 | 2751 (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
|
2752 (buffer-disable-undo) |
17493 | 2753 (setq buffer-read-only t) |
2754 (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
|
2755 (mm-enable-multibyte) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2756 (gnus-run-hooks 'gnus-article-mode-hook)) |
17493 | 2757 |
2758 (defun gnus-article-setup-buffer () | |
2759 "Initialize the article buffer." | |
2760 (let* ((name (if gnus-single-article-buffer "*Article*" | |
2761 (concat "*Article " gnus-newsgroup-name "*"))) | |
2762 (original | |
2763 (progn (string-match "\\*Article" name) | |
2764 (concat " *Original Article" | |
2765 (substring name (match-end 0)))))) | |
2766 (setq gnus-article-buffer name) | |
2767 (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
|
2768 (setq gnus-article-mime-handle-alist nil) |
17493 | 2769 ;; This might be a variable local to the summary buffer. |
2770 (unless gnus-single-article-buffer | |
2771 (save-excursion | |
2772 (set-buffer gnus-summary-buffer) | |
2773 (setq gnus-article-buffer name) | |
2774 (setq gnus-original-article-buffer original) | |
2775 (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
|
2776 (gnus-article-setup-highlight-words) |
17493 | 2777 ;; Init original article buffer. |
2778 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2779 (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
|
2780 (mm-enable-multibyte) |
17493 | 2781 (setq major-mode 'gnus-original-article-mode) |
2782 (make-local-variable 'gnus-original-article)) | |
2783 (if (get-buffer name) | |
2784 (save-excursion | |
2785 (set-buffer name) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2786 (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
|
2787 (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
|
2788 (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
|
2789 ;; Set it to nil in article-buffer! |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2790 (setq gnus-article-mime-handle-alist nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2791 (buffer-disable-undo) |
17493 | 2792 (setq buffer-read-only t) |
2793 (unless (eq major-mode 'gnus-article-mode) | |
2794 (gnus-article-mode)) | |
2795 (current-buffer)) | |
2796 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2797 (set-buffer (gnus-get-buffer-create name)) |
17493 | 2798 (gnus-article-mode) |
2799 (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
|
2800 (gnus-summary-set-local-parameters gnus-newsgroup-name) |
17493 | 2801 (current-buffer))))) |
2802 | |
2803 ;; Set article window start at LINE, where LINE is the number of lines | |
2804 ;; from the head of the article. | |
2805 (defun gnus-article-set-window-start (&optional line) | |
2806 (set-window-start | |
2807 (get-buffer-window gnus-article-buffer t) | |
2808 (save-excursion | |
2809 (set-buffer gnus-article-buffer) | |
2810 (goto-char (point-min)) | |
2811 (if (not line) | |
2812 (point-min) | |
2813 (gnus-message 6 "Moved to bookmark") | |
2814 (search-forward "\n\n" nil t) | |
2815 (forward-line line) | |
2816 (point))))) | |
2817 | |
2818 (defun gnus-article-prepare (article &optional all-headers header) | |
2819 "Prepare ARTICLE in article mode buffer. | |
2820 ARTICLE should either be an article number or a Message-ID. | |
2821 If ARTICLE is an id, HEADER should be the article headers. | |
2822 If ALL-HEADERS is non-nil, no headers are hidden." | |
2823 (save-excursion | |
2824 ;; Make sure we start in a summary buffer. | |
2825 (unless (eq major-mode 'gnus-summary-mode) | |
2826 (set-buffer gnus-summary-buffer)) | |
2827 (setq gnus-summary-buffer (current-buffer)) | |
2828 (let* ((gnus-article (if header (mail-header-number header) article)) | |
2829 (summary-buffer (current-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2830 (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) |
17493 | 2831 (group gnus-newsgroup-name) |
2832 result) | |
2833 (save-excursion | |
2834 (gnus-article-setup-buffer) | |
2835 (set-buffer gnus-article-buffer) | |
2836 ;; Deactivate active regions. | |
2837 (when (and (boundp 'transient-mark-mode) | |
2838 transient-mark-mode) | |
2839 (setq mark-active nil)) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2840 (if (not (setq result (let ((inhibit-read-only t)) |
17493 | 2841 (gnus-request-article-this-buffer |
2842 article group)))) | |
2843 ;; There is no such article. | |
2844 (save-excursion | |
2845 (when (and (numberp article) | |
2846 (not (memq article gnus-newsgroup-sparse))) | |
2847 (setq gnus-article-current | |
2848 (cons gnus-newsgroup-name article)) | |
2849 (set-buffer gnus-summary-buffer) | |
2850 (setq gnus-current-article article) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2851 (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
|
2852 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2853 (gnus-summary-set-agent-mark article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2854 (message "Message marked for downloading")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2855 (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
|
2856 (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
|
2857 (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
|
2858 (if (or (eq result 'pseudo) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2859 (eq result 'nneething)) |
17493 | 2860 (progn |
2861 (save-excursion | |
2862 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2863 (push article gnus-newsgroup-history) |
17493 | 2864 (setq gnus-last-article gnus-current-article |
2865 gnus-current-article 0 | |
2866 gnus-current-headers nil | |
2867 gnus-article-current nil) | |
2868 (if (eq result 'nneething) | |
2869 (gnus-configure-windows 'summary) | |
2870 (gnus-configure-windows 'article)) | |
2871 (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
|
2872 (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
|
2873 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
|
2874 (gnus-set-mode-line 'article))) |
17493 | 2875 ;; The result from the `request' was an actual article - |
2876 ;; or at least some text that is now displayed in the | |
2877 ;; article buffer. | |
2878 (when (and (numberp article) | |
2879 (not (eq article gnus-current-article))) | |
2880 ;; Seems like a new article has been selected. | |
2881 ;; `gnus-current-article' must be an article number. | |
2882 (save-excursion | |
2883 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2884 (push article gnus-newsgroup-history) |
17493 | 2885 (setq gnus-last-article gnus-current-article |
2886 gnus-current-article article | |
2887 gnus-current-headers | |
2888 (gnus-summary-article-header gnus-current-article) | |
2889 gnus-article-current | |
2890 (cons gnus-newsgroup-name gnus-current-article)) | |
2891 (unless (vectorp gnus-current-headers) | |
2892 (setq gnus-current-headers nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2893 (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
|
2894 (when (gnus-summary-show-thread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2895 ;; 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
|
2896 ;; 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
|
2897 ;; 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
|
2898 ;; So we go again. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2899 (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
|
2900 (gnus-run-hooks 'gnus-mark-article-hook) |
17493 | 2901 (gnus-set-mode-line 'summary) |
2902 (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
|
2903 (gnus-run-hooks 'gnus-visual-mark-article-hook)) |
17493 | 2904 ;; Set the global newsgroup variables here. |
2905 (gnus-set-global-variables) | |
2906 (setq gnus-have-all-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2907 (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
|
2908 (save-excursion |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
2909 (gnus-configure-windows 'article)) |
17493 | 2910 (when (or (numberp article) |
2911 (stringp article)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2912 (gnus-article-prepare-display) |
17493 | 2913 ;; Do page break. |
2914 (goto-char (point-min)) | |
2915 (setq gnus-page-broken | |
2916 (when gnus-break-pages | |
2917 (gnus-narrow-to-page) | |
2918 t))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2919 (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
|
2920 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
|
2921 (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
|
2922 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2923 (set-window-point (get-buffer-window (current-buffer)) (point)) |
17493 | 2924 (gnus-configure-windows 'article) |
2925 t)))))) | |
2926 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2927 ;;;###autoload |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2928 (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
|
2929 "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
|
2930 ;; 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
|
2931 ;; 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
|
2932 (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
|
2933 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2934 (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
|
2935 (gnus-article-mode)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2936 (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
|
2937 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
|
2938 (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
|
2939 (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
|
2940 (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
|
2941 (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
|
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 ;;; Gnus MIME viewing functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2945 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2946 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2947 (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
|
2948 "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
|
2949 %t The MIME type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2950 %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
|
2951 %n The `name' parameter |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2952 %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
|
2953 %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
|
2954 %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
|
2955 %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
|
2956 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2957 (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
|
2958 '((?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
|
2959 (?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
|
2960 (?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
|
2961 (?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
|
2962 (?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
|
2963 (?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
|
2964 (?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
|
2965 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2966 (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
|
2967 '((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
|
2968 (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
|
2969 (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
|
2970 (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
|
2971 (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
|
2972 (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
|
2973 (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
|
2974 (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
|
2975 (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
|
2976 (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
|
2977 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2978 (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
|
2979 (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
|
2980 (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
|
2981 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2982 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2983 (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
|
2984 (let ((map (make-sparse-keymap))) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2985 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2986 ;; (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
|
2987 (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
|
2988 (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
|
2989 (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
|
2990 (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
|
2991 map)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2992 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2993 (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
|
2994 "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
|
2995 (interactive "e") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2996 (save-excursion |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2997 (mouse-set-point event) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2998 (gnus-article-check-buffer) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
2999 (let ((response (x-popup-menu |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3000 t `("MIME Part" |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3001 ("" ,@(mapcar (lambda (c) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3002 (cons (caddr c) (car c))) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3003 gnus-mime-button-commands)))))) |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3004 (if response |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3005 (call-interactively response))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3006 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3007 (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
|
3008 "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
|
3009 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3010 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3011 (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
|
3012 (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
|
3013 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3014 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3015 (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
|
3016 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3017 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3018 (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
|
3019 (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
|
3020 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3021 (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
|
3022 "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
|
3023 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3024 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3025 (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
|
3026 (mm-save-part data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3027 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3028 (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
|
3029 "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
|
3030 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3031 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3032 (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
|
3033 (mm-pipe-part data))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3034 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3035 (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
|
3036 "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
|
3037 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3038 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3039 (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
|
3040 (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
|
3041 (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
|
3042 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3043 (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
|
3044 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3045 (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
|
3046 (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
|
3047 'name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3048 (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
|
3049 (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
|
3050 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3051 (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
|
3052 "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
|
3053 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3054 (list (completing-read |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3055 "View as MIME type: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3056 (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
|
3057 nil nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3058 (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
|
3059 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3060 (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
|
3061 (gnus-mm-display-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3062 (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
|
3063 (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
|
3064 (mm-handle-encoding handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3065 (mm-handle-undisplayer handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3066 (mm-handle-disposition handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3067 (mm-handle-description handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3068 (mm-handle-cache handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3069 (mm-handle-id handle))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3070 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3071 (defun gnus-mime-copy-part (&optional handle) |
45317
da1c26da109e
(gnus-mime-copy-part): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
43446
diff
changeset
|
3072 "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
|
3073 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3074 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3075 (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
|
3076 (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
|
3077 (base (file-name-nondirectory |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3078 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3079 (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
|
3080 (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
|
3081 'filename) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3082 "*decoded*"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3083 (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
|
3084 (switch-to-buffer buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3085 (insert contents) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3086 ;; 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
|
3087 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3088 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3089 (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
|
3090 (normal-mode)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3091 (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
|
3092 (goto-char (point-min)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3093 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3094 (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
|
3095 "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
|
3096 (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
|
3097 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3098 (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
|
3099 contents charset |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3100 (b (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3101 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3102 (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
|
3103 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3104 (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
|
3105 (cond |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3106 ((not arg) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3107 (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
|
3108 (mm-handle-type handle) 'charset) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3109 gnus-newsgroup-charset))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3110 ((numberp arg) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3111 (setq charset |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3112 (or (cdr (assq arg |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3113 gnus-summary-show-article-charset-alist)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3114 (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
|
3115 (forward-line 2) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3116 (mm-insert-inline handle |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3117 (if (and charset |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3118 (setq charset (mm-charset-to-coding-system |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3119 charset)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3120 (not (eq charset 'ascii))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3121 (mm-decode-coding-string contents charset) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3122 contents)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3123 (goto-char b)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3124 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3125 (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
|
3126 "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
|
3127 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3128 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3129 (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
|
3130 (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
|
3131 (mm-inlined-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3132 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3133 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3134 (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
|
3135 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3136 (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
|
3137 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3138 (mm-display-part handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3139 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3140 (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
|
3141 "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
|
3142 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
|
3143 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3144 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3145 (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
|
3146 (mm-inlined-types '(".*")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3147 (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
|
3148 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3149 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3150 (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
|
3151 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3152 (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
|
3153 (mm-remove-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3154 (mm-display-part handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3155 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3156 (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
|
3157 "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
|
3158 (interactive |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3159 (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
|
3160 (gnus-article-check-buffer) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3161 (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
|
3162 (if action-pair |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3163 (funcall (cdr action-pair))))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3164 |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3165 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3166 (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
|
3167 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3168 (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
|
3169 (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
|
3170 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3171 (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
|
3172 (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
|
3173 (funcall function handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3174 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3175 (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
|
3176 "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
|
3177 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3178 (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
|
3179 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3180 (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
|
3181 "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
|
3182 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3183 (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
|
3184 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3185 (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
|
3186 "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
|
3187 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3188 (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
|
3189 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3190 (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
|
3191 "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
|
3192 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3193 (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
|
3194 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3195 (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
|
3196 "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
|
3197 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3198 (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
|
3199 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3200 (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
|
3201 "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
|
3202 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3203 (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
|
3204 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3205 (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
|
3206 (if condition |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3207 (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
|
3208 (while (setq ihandle (pop alist)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3209 (if (and (cond |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3210 ((functionp condition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3211 (funcall condition (cdr ihandle))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3212 ((eq condition 'undisplayed) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3213 (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
|
3214 (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
|
3215 "multipart/alternative")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3216 ((eq condition 'undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3217 (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
|
3218 (t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3219 (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
|
3220 (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
|
3221 (setq n (car ihandle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3222 (or n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3223 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3224 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3225 (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
|
3226 "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
|
3227 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3228 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3229 (set-buffer gnus-article-buffer) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3230 (or (numberp n) (setq n (gnus-article-mime-match-handle-first |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3231 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
|
3232 (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
|
3233 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3234 (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
|
3235 (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
|
3236 (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
|
3237 (gnus-article-press-button) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3238 (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
|
3239 (gnus-set-window-start))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3240 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3241 (defsubst gnus-article-mime-total-parts () |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3242 (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
|
3243 1 ;; single part |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3244 (1- (length gnus-article-mime-handles)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3245 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3246 (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
|
3247 "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
|
3248 (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
|
3249 (point (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3250 buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3251 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3252 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3253 (let ((window (selected-window)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3254 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3255 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3256 (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
|
3257 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3258 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3259 (unwind-protect |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3260 (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
|
3261 (beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3262 (when win |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3263 (select-window win)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3264 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3265 (forward-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3266 (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
|
3267 ;; 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
|
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 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3270 (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
|
3271 (mm-display-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3272 ;; 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
|
3273 ;; 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
|
3274 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3275 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3276 (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
|
3277 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3278 nil id |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3279 (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
|
3280 (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
|
3281 (select-window window)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3282 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3283 (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
|
3284 (gnus-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3285 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
|
3286 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3287 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3288 (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
|
3289 "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
|
3290 (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
|
3291 (when point |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3292 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3293 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3294 (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
|
3295 (let ((gnus-tmp-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3296 (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
|
3297 'name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3298 (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
|
3299 'filename) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3300 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3301 (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
|
3302 (gnus-tmp-description |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3303 (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
|
3304 ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3305 (gnus-tmp-dots |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3306 (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
|
3307 (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
|
3308 "" "...")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3309 (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
|
3310 (buffer-size))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3311 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
|
3312 (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
|
3313 (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
|
3314 (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
|
3315 (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
|
3316 (concat "; " gnus-tmp-name)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3317 (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
|
3318 (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
|
3319 (unless (bolp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3320 (insert "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3321 (setq b (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3322 (gnus-eval-format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3323 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
|
3324 `(keymap ,gnus-mime-button-map |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3325 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3326 ;; local-map ,gnus-mime-button-map |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3327 gnus-callback gnus-mm-display-part |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3328 gnus-part ,gnus-tmp-id |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3329 article-type annotation |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3330 gnus-data ,handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3331 (setq e (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3332 (widget-convert-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3333 'link b e |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3334 :mime-handle handle |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3335 :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
|
3336 :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
|
3337 :help-echo |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3338 (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
|
3339 ;; 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
|
3340 ;; wid-edit (XEmacs only). |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3341 (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
|
3342 (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
|
3343 (format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3344 "%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
|
3345 (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
|
3346 ;; 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
|
3347 ;; window, overlay, position. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3348 (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
|
3349 (if overlay |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3350 (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
|
3351 (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
|
3352 :mime-handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3353 (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
|
3354 "hide" "show") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3355 (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
|
3356 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3357 (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
|
3358 (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
|
3359 (gnus-article-press-button)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3360 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3361 (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
|
3362 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3363 (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
|
3364 "Display the MIME parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3365 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3366 (save-selected-window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3367 (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
|
3368 (point (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3369 (when window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3370 (select-window window) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3371 ;; 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
|
3372 ;; 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
|
3373 (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
|
3374 (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
|
3375 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
|
3376 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3377 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3378 ;; 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
|
3379 (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
|
3380 (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
|
3381 (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
|
3382 (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
|
3383 ;; 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
|
3384 (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
|
3385 (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
|
3386 (if (and handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3387 (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
|
3388 (cdr handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3389 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3390 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3391 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3392 ;; 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
|
3393 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3394 (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
|
3395 (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
|
3396 (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
|
3397 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3398 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3399 (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
|
3400 (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
|
3401 (widen))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3402 (unless ihandles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3403 ;; Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3404 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3405 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3406 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3407 (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
|
3408 (gnus-treat-article 'head)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3409 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3410 (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
|
3411 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3412 (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
|
3413 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3414 ;; Single part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3415 ((not (stringp (car handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3416 (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
|
3417 ;; User-defined multipart |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3418 ((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
|
3419 (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
|
3420 handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3421 ;; multipart/alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3422 ((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
|
3423 (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
|
3424 (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
|
3425 (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
|
3426 (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
|
3427 ;; multipart/related |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3428 ((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
|
3429 (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
|
3430 ;;;!!!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
|
3431 ;;;!!!to the first part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3432 (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
|
3433 ;; 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
|
3434 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3435 (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
|
3436 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3437 (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
|
3438 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3439 (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
|
3440 (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
|
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-mixed (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3443 (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
|
3444 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3445 (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
|
3446 (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
|
3447 (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
|
3448 (not-attachment t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3449 (move nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3450 display text) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3451 (catch 'ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3452 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3453 (while ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3454 (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
|
3455 (throw 'ignored nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3456 (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
|
3457 (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
|
3458 (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
|
3459 (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
|
3460 "inline") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3461 (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
|
3462 (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
|
3463 (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
|
3464 (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
|
3465 (setq display t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3466 (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
|
3467 (setq text t))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3468 (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
|
3469 beg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3470 (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
|
3471 (when (or (not display) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3472 (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
|
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-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3475 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
|
3476 (gnus-article-insert-newline) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3477 ;(gnus-article-insert-newline) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3478 (setq move t)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3479 (setq beg (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3480 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3481 (display |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3482 (when move |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3483 (forward-line -2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3484 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3485 (let ((mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3486 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3487 (save-excursion (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3488 (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
|
3489 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3490 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3491 (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
|
3492 (goto-char (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3493 ((and text not-attachment) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3494 (when move |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3495 (forward-line -2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3496 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3497 (gnus-article-insert-newline) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3498 (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
|
3499 (goto-char (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3500 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3501 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3502 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3503 (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
|
3504 (gnus-treat-article |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3505 nil id |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3506 (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
|
3507 (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
|
3508 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3509 (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
|
3510 "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
|
3511 (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
|
3512 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3513 (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
|
3514 (while types |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3515 (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
|
3516 (throw 'found t))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3517 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3518 (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
|
3519 "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
|
3520 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3521 (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
|
3522 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3523 (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
|
3524 (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
|
3525 (ihandles handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3526 (point (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3527 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
|
3528 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3529 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3530 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3531 (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
|
3532 (or (cdr ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3533 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3534 (goto-char (car ibegend)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3535 (forward-line 2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3536 (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3537 (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
|
3538 (mm-remove-parts handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3539 (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
|
3540 ;; Do the toggle. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3541 (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
|
3542 (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
|
3543 (when (or ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3544 (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
|
3545 "multipart/alternative"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3546 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3547 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3548 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3549 (insert (format "%d. " id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3550 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3551 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3552 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3553 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3554 (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
|
3555 ',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
|
3556 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3557 ',ihandles ',not-pref ',begend ,id)) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3558 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3559 ;; 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
|
3560 ,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
|
3561 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
|
3562 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
|
3563 gnus-part ,id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3564 gnus-data ,handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3565 (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
|
3566 :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
|
3567 :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
|
3568 ;; Do the handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3569 (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
|
3570 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3571 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3572 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3573 (insert (format "(%c) %-18s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3574 (if (equal handle preferred) ?* ? ) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3575 (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
|
3576 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3577 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3578 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3579 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3580 (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
|
3581 ',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
|
3582 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3583 ',ihandles ',handle ',begend ,id)) |
33691
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3584 ;; Not for Emacs 21: fixme better. |
936c632692fd
(gnus-mime-button-map): Don't inherit from
Dave Love <fx@gnu.org>
parents:
33397
diff
changeset
|
3585 ;; 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
|
3586 ,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
|
3587 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
|
3588 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
|
3589 gnus-part ,id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3590 gnus-data ,handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3591 (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
|
3592 :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
|
3593 :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
|
3594 (insert " ")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3595 (insert "\n\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3596 (when preferred |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3597 (if (stringp (car preferred)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3598 (gnus-display-mime preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3599 (let ((mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3600 (mail-parse-ignored-charsets |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3601 (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
|
3602 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3603 (mm-display-part preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3604 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3605 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3606 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3607 (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
|
3608 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3609 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
|
3610 (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
|
3611 (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
|
3612 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3613 (setcdr begend (point-marker))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3614 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3615 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3616 |
17493 | 3617 (defun gnus-article-wash-status () |
3618 "Return a string which display status of article washing." | |
3619 (save-excursion | |
3620 (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
|
3621 (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
|
3622 (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
|
3623 (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
|
3624 (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
|
3625 (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
|
3626 (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
|
3627 (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
|
3628 (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
|
3629 (format "%c%c%c%c%c%c" |
17493 | 3630 (if cite ?c ? ) |
3631 (if (or headers boring) ?h ? ) | |
3632 (if (or pgp pem) ?p ? ) | |
3633 (if signature ?s ? ) | |
3634 (if overstrike ?o ? ) | |
3635 (if emphasis ?e ? ))))) | |
3636 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3637 (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
|
3638 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3639 (defun gnus-article-maybe-hide-headers () |
17493 | 3640 "Hide unwanted headers if `gnus-have-all-headers' is nil. |
3641 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
|
3642 (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
|
3643 (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
|
3644 gnus-have-all-headers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3645 (not gnus-inhibit-hiding)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3646 (gnus-article-hide-headers))) |
17493 | 3647 |
3648 ;;; Article savers. | |
3649 | |
3650 (defun gnus-output-to-file (file-name) | |
3651 "Append the current article to a file named FILE-NAME." | |
3652 (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
|
3653 (with-temp-buffer |
17493 | 3654 (insert-buffer-substring artbuf) |
3655 ;; Append newline at end of the buffer as separator, and then | |
3656 ;; save it to file. | |
3657 (goto-char (point-max)) | |
3658 (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
|
3659 (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
|
3660 (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
|
3661 t))) |
17493 | 3662 |
3663 (defun gnus-narrow-to-page (&optional arg) | |
3664 "Narrow the article buffer to a page. | |
3665 If given a numerical ARG, move forward ARG pages." | |
3666 (interactive "P") | |
3667 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
3668 (save-excursion | |
3669 (set-buffer gnus-article-buffer) | |
3670 (goto-char (point-min)) | |
3671 (widen) | |
3672 ;; Remove any old next/prev buttons. | |
3673 (when (gnus-visual-p 'page-marker) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3674 (let ((inhibit-read-only t)) |
17493 | 3675 (gnus-remove-text-with-property 'gnus-prev) |
3676 (gnus-remove-text-with-property 'gnus-next))) | |
3677 (when | |
3678 (cond ((< arg 0) | |
3679 (re-search-backward page-delimiter nil 'move (1+ (abs arg)))) | |
3680 ((> arg 0) | |
3681 (re-search-forward page-delimiter nil 'move arg))) | |
3682 (goto-char (match-end 0))) | |
3683 (narrow-to-region | |
3684 (point) | |
3685 (if (re-search-forward page-delimiter nil 'move) | |
3686 (match-beginning 0) | |
3687 (point))) | |
3688 (when (and (gnus-visual-p 'page-marker) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3689 (> (point-min) (save-restriction (widen) (point-min)))) |
17493 | 3690 (save-excursion |
3691 (goto-char (point-min)) | |
3692 (gnus-insert-prev-page-button))) | |
3693 (when (and (gnus-visual-p 'page-marker) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3694 (< (point-max) (save-restriction (widen) (point-max)))) |
17493 | 3695 (save-excursion |
3696 (goto-char (point-max)) | |
3697 (gnus-insert-next-page-button))))) | |
3698 | |
3699 ;; Article mode commands | |
3700 | |
3701 (defun gnus-article-goto-next-page () | |
3702 "Show the next page of the article." | |
3703 (interactive) | |
3704 (when (gnus-article-next-page) | |
3705 (goto-char (point-min)) | |
3706 (gnus-article-read-summary-keys nil (gnus-character-to-event ?n)))) | |
3707 | |
3708 (defun gnus-article-goto-prev-page () | |
3709 "Show the next page of the article." | |
3710 (interactive) | |
3711 (if (bobp) (gnus-article-read-summary-keys nil (gnus-character-to-event ?p)) | |
3712 (gnus-article-prev-page nil))) | |
3713 | |
3714 (defun gnus-article-next-page (&optional lines) | |
3715 "Show the next page of the current article. | |
3716 If end of article, return non-nil. Otherwise return nil. | |
3717 Argument LINES specifies lines to be scrolled up." | |
3718 (interactive "p") | |
3719 (move-to-window-line -1) | |
3720 (if (save-excursion | |
3721 (end-of-line) | |
3722 (and (pos-visible-in-window-p) ;Not continuation line. | |
3723 (eobp))) | |
3724 ;; Nothing in this page. | |
3725 (if (or (not gnus-page-broken) | |
3726 (save-excursion | |
3727 (save-restriction | |
3728 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
3729 t ;Nothing more. | |
3730 (gnus-narrow-to-page 1) ;Go to next page. | |
3731 nil) | |
3732 ;; More in this page. | |
3733 (let ((scroll-in-place nil)) | |
3734 (condition-case () | |
3735 (scroll-up lines) | |
3736 (end-of-buffer | |
3737 ;; Long lines may cause an end-of-buffer error. | |
3738 (goto-char (point-max))))) | |
3739 (move-to-window-line 0) | |
3740 nil)) | |
3741 | |
3742 (defun gnus-article-prev-page (&optional lines) | |
3743 "Show previous page of current article. | |
3744 Argument LINES specifies lines to be scrolled down." | |
3745 (interactive "p") | |
3746 (move-to-window-line 0) | |
3747 (if (and gnus-page-broken | |
3748 (bobp) | |
3749 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
3750 (progn | |
3751 (gnus-narrow-to-page -1) ;Go to previous page. | |
3752 (goto-char (point-max)) | |
3753 (recenter -1)) | |
3754 (let ((scroll-in-place nil)) | |
3755 (prog1 | |
3756 (condition-case () | |
3757 (scroll-down lines) | |
3758 (beginning-of-buffer | |
3759 (goto-char (point-min)))) | |
3760 (move-to-window-line 0))))) | |
3761 | |
3762 (defun gnus-article-refer-article () | |
3763 "Read article specified by message-id around point." | |
3764 (interactive) | |
3765 (let ((point (point))) | |
3766 (search-forward ">" nil t) ;Move point to end of "<....>". | |
3767 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
3768 (let ((message-id (match-string 1))) | |
3769 (goto-char point) | |
3770 (set-buffer gnus-summary-buffer) | |
3771 (gnus-summary-refer-article message-id)) | |
3772 (goto-char (point)) | |
3773 (error "No references around point")))) | |
3774 | |
3775 (defun gnus-article-show-summary () | |
3776 "Reconfigure windows to show summary buffer." | |
3777 (interactive) | |
3778 (if (not (gnus-buffer-live-p gnus-summary-buffer)) | |
3779 (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
|
3780 (gnus-article-set-globals) |
17493 | 3781 (gnus-configure-windows 'article) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3782 (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
|
3783 (gnus-summary-position-point))) |
17493 | 3784 |
3785 (defun gnus-article-describe-briefly () | |
3786 "Describe article mode commands briefly." | |
3787 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3788 (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 | 3789 |
3790 (defun gnus-article-summary-command () | |
3791 "Execute the last keystroke in the summary buffer." | |
3792 (interactive) | |
3793 (let ((obuf (current-buffer)) | |
3794 (owin (current-window-configuration)) | |
3795 func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3796 (switch-to-buffer gnus-article-current-summary 'norecord) |
17493 | 3797 (setq func (lookup-key (current-local-map) (this-command-keys))) |
3798 (call-interactively func) | |
3799 (set-buffer obuf) | |
3800 (set-window-configuration owin) | |
3801 (set-window-point (get-buffer-window (current-buffer)) (point)))) | |
3802 | |
3803 (defun gnus-article-summary-command-nosave () | |
3804 "Execute the last keystroke in the summary buffer." | |
3805 (interactive) | |
3806 (let (func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3807 (pop-to-buffer gnus-article-current-summary 'norecord) |
17493 | 3808 (setq func (lookup-key (current-local-map) (this-command-keys))) |
3809 (call-interactively func))) | |
3810 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3811 (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
|
3812 "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
|
3813 (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
|
3814 (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
|
3815 |
17493 | 3816 (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) |
3817 "Read a summary buffer key sequence and execute it from the article buffer." | |
3818 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3819 (gnus-article-check-buffer) |
17493 | 3820 (let ((nosaves |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3821 '("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
|
3822 "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
|
3823 "=" "^" "\M-^" "|")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3824 (nosave-but-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3825 '("A\r")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3826 (nosave-in-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3827 '("\C-d")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3828 (up-to-top |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3829 '("n" "Gn" "p" "Gp")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3830 keys new-sum-point) |
17493 | 3831 (save-excursion |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3832 (set-buffer gnus-article-current-summary) |
17493 | 3833 (let (gnus-pick-mode) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3834 (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
|
3835 (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
|
3836 (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
|
3837 (read-key-sequence nil))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3838 |
17493 | 3839 (message "") |
3840 | |
3841 (if (or (member keys nosaves) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3842 (member keys nosave-but-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3843 (member keys nosave-in-article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3844 (let (func) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3845 (save-window-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3846 (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
|
3847 ;; 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
|
3848 (let (gnus-pick-mode) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3849 (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
|
3850 (if (or (not func) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3851 (numberp func)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3852 (ding) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3853 (unless (member keys nosave-in-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3854 (set-buffer gnus-article-current-summary)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3855 (call-interactively func) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3856 (setq new-sum-point (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3857 (when (member keys nosave-but-article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3858 (pop-to-buffer gnus-article-buffer 'norecord))) |
17493 | 3859 ;; These commands should restore window configuration. |
3860 (let ((obuf (current-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3861 (owin (current-window-configuration)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3862 (opoint (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3863 (summary gnus-article-current-summary) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3864 func in-buffer selected) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3865 (if not-restore-window |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3866 (pop-to-buffer summary 'norecord) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3867 (switch-to-buffer summary 'norecord)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3868 (setq in-buffer (current-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3869 ;; 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
|
3870 (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
|
3871 (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
|
3872 (functionp func)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3873 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3874 (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
|
3875 (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
|
3876 (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
|
3877 (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
|
3878 (set-buffer obuf) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3879 (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
|
3880 (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
|
3881 (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
|
3882 (article-goto-body) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3883 (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
|
3884 1) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3885 (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
|
3886 (point))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3887 (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
|
3888 (when win |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3889 (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
|
3890 (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
|
3891 (ding)))))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3892 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3893 (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
|
3894 "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
|
3895 (interactive "kDescribe key: ") |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3896 (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
|
3897 (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
|
3898 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3899 (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
|
3900 (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
|
3901 (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
|
3902 (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
|
3903 (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
|
3904 (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
|
3905 (describe-key key)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3906 (describe-key key))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3907 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3908 (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
|
3909 "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
|
3910 (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
|
3911 (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
|
3912 (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
|
3913 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3914 (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
|
3915 (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
|
3916 (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
|
3917 (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
|
3918 (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
|
3919 (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
|
3920 (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
|
3921 (describe-key-briefly key insert))) |
17493 | 3922 |
3923 (defun gnus-article-hide (&optional arg force) | |
3924 "Hide all the gruft in the current article. | |
3925 This means that PGP stuff, signatures, cited text and (some) | |
3926 headers will be hidden. | |
3927 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
|
3928 (interactive (append (gnus-article-hidden-arg) (list 'force))) |
17493 | 3929 (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
|
3930 (gnus-article-hide-list-identifiers arg) |
17493 | 3931 (gnus-article-hide-pgp arg) |
3932 (gnus-article-hide-citation-maybe arg force) | |
3933 (gnus-article-hide-signature arg)) | |
3934 | |
3935 (defun gnus-article-maybe-highlight () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3936 "Do some article highlighting if article highlighting is requested." |
17493 | 3937 (when (gnus-visual-p 'article-highlight 'highlight) |
3938 (gnus-article-highlight-some))) | |
3939 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3940 (defun gnus-check-group-server () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3941 ;; 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
|
3942 (unless (gnus-server-opened |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3943 (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
|
3944 (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
|
3945 (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
|
3946 |
17493 | 3947 (defun gnus-request-article-this-buffer (article group) |
3948 "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
|
3949 (let (do-update-line sparse-header) |
17493 | 3950 (prog1 |
3951 (save-excursion | |
3952 (erase-buffer) | |
3953 (gnus-kill-all-overlays) | |
3954 (setq group (or group gnus-newsgroup-name)) | |
3955 | |
3956 ;; Using `gnus-request-article' directly will insert the article into | |
3957 ;; `nntp-server-buffer' - so we'll save some time by not having to | |
3958 ;; copy it from the server buffer into the article buffer. | |
3959 | |
3960 ;; We only request an article by message-id when we do not have the | |
3961 ;; headers for it, so we'll have to get those. | |
3962 (when (stringp article) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3963 (gnus-read-header article)) |
17493 | 3964 |
3965 ;; If the article number is negative, that means that this article | |
3966 ;; doesn't belong in this newsgroup (possibly), so we find its | |
3967 ;; message-id and request it by id instead of number. | |
3968 (when (and (numberp article) | |
3969 gnus-summary-buffer | |
3970 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3971 (gnus-buffer-exists-p gnus-summary-buffer)) |
17493 | 3972 (save-excursion |
3973 (set-buffer gnus-summary-buffer) | |
3974 (let ((header (gnus-summary-article-header article))) | |
3975 (when (< article 0) | |
3976 (cond | |
3977 ((memq article gnus-newsgroup-sparse) | |
3978 ;; This is a sparse gap article. | |
3979 (setq do-update-line article) | |
3980 (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
|
3981 (setq sparse-header (gnus-read-header article)) |
17493 | 3982 (setq gnus-newsgroup-sparse |
3983 (delq article gnus-newsgroup-sparse))) | |
3984 ((vectorp header) | |
3985 ;; It's a real article. | |
3986 (setq article (mail-header-id header))) | |
3987 (t | |
3988 ;; It is an extracted pseudo-article. | |
3989 (setq article 'pseudo) | |
3990 (gnus-request-pseudo-article header)))) | |
3991 | |
3992 (let ((method (gnus-find-method-for-group | |
3993 gnus-newsgroup-name))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3994 (when (and (eq (car method) 'nneething) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3995 (vectorp header)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3996 (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
|
3997 (mail-header-subject header) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3998 (file-name-as-directory |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3999 (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
|
4000 (nth 1 method)))))) |
17493 | 4001 (when (file-directory-p dir) |
4002 (setq article 'nneething) | |
4003 (gnus-group-enter-directory dir)))))))) | |
4004 | |
4005 (cond | |
4006 ;; Refuse to select canceled articles. | |
4007 ((and (numberp article) | |
4008 gnus-summary-buffer | |
4009 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4010 (gnus-buffer-exists-p gnus-summary-buffer) |
17493 | 4011 (eq (cdr (save-excursion |
4012 (set-buffer gnus-summary-buffer) | |
4013 (assq article gnus-newsgroup-reads))) | |
4014 gnus-canceled-mark)) | |
4015 nil) | |
4016 ;; We first check `gnus-original-article-buffer'. | |
4017 ((and (get-buffer gnus-original-article-buffer) | |
4018 (numberp article) | |
4019 (save-excursion | |
4020 (set-buffer gnus-original-article-buffer) | |
4021 (and (equal (car gnus-original-article) group) | |
4022 (eq (cdr gnus-original-article) article)))) | |
4023 (insert-buffer-substring gnus-original-article-buffer) | |
4024 'article) | |
4025 ;; Check the backlog. | |
4026 ((and gnus-keep-backlog | |
4027 (gnus-backlog-request-article group article (current-buffer))) | |
4028 'article) | |
4029 ;; Check asynchronous pre-fetch. | |
4030 ((gnus-async-request-fetched-article group article (current-buffer)) | |
4031 (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
|
4032 (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
|
4033 (gnus-backlog-enter-article group article (current-buffer))) |
17493 | 4034 'article) |
4035 ;; Check the cache. | |
4036 ((and gnus-use-cache | |
4037 (numberp article) | |
4038 (gnus-cache-request-article article group)) | |
4039 'article) | |
4040 ;; 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
|
4041 ((or (stringp article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4042 (numberp article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4043 (let ((gnus-override-method gnus-override-method) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4044 (methods (and (stringp article) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4045 gnus-refer-article-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4046 result |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4047 (inhibit-read-only t)) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4048 (if (or (not (listp methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4049 (and (symbolp (car methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4050 (assq (car methods) nnoo-definition-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4051 (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
|
4052 (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
|
4053 methods) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4054 (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
|
4055 (while (not result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4056 (when (eq gnus-override-method 'current) |
39335
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4057 (setq gnus-override-method |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4058 (with-current-buffer gnus-summary-buffer |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
4059 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
|
4060 (erase-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4061 (gnus-kill-all-overlays) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4062 (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
|
4063 (gnus-check-group-server)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4064 (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
|
4065 (when (numberp article) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4066 (gnus-async-prefetch-next group article |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4067 gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4068 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4069 (gnus-backlog-enter-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4070 group article (current-buffer)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4071 (setq result 'article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4072 (if (not result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4073 (if methods |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4074 (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
|
4075 (setq result 'done)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4076 (and (eq result 'article) 'article))) |
17493 | 4077 ;; It was a pseudo. |
4078 (t article))) | |
4079 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4080 ;; 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
|
4081 (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
|
4082 |
17493 | 4083 ;; Take the article from the original article buffer |
4084 ;; and place it in the buffer it's supposed to be in. | |
4085 (when (and (get-buffer gnus-article-buffer) | |
4086 (equal (buffer-name (current-buffer)) | |
4087 (buffer-name (get-buffer gnus-article-buffer)))) | |
4088 (save-excursion | |
4089 (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
|
4090 (set-buffer gnus-original-article-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4091 (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
|
4092 (buffer-disable-undo) |
17493 | 4093 (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
|
4094 (setq buffer-read-only t)) |
17493 | 4095 (let (buffer-read-only) |
4096 (erase-buffer) | |
4097 (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
|
4098 (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
|
4099 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4100 ;; Decode charsets. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4101 (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
|
4102 ;; 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
|
4103 (setq gnus-article-decoded-p gnus-article-decode-hook)) |
17493 | 4104 |
4105 ;; Update sparse articles. | |
4106 (when (and do-update-line | |
4107 (or (numberp article) | |
4108 (stringp article))) | |
4109 (let ((buf (current-buffer))) | |
4110 (set-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4111 (gnus-summary-update-article do-update-line sparse-header) |
17493 | 4112 (gnus-summary-goto-subject do-update-line nil t) |
4113 (set-window-point (get-buffer-window (current-buffer) t) | |
4114 (point)) | |
4115 (set-buffer buf)))))) | |
4116 | |
4117 ;;; | |
4118 ;;; Article editing | |
4119 ;;; | |
4120 | |
4121 (defcustom gnus-article-edit-mode-hook nil | |
4122 "Hook run in article edit mode buffers." | |
4123 :group 'gnus-article-various | |
4124 :type 'hook) | |
4125 | |
4126 (defvar gnus-article-edit-done-function nil) | |
4127 | |
4128 (defvar gnus-article-edit-mode-map nil) | |
4129 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4130 ;; Should we be using derived.el for this? |
17493 | 4131 (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
|
4132 (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
|
4133 (set-keymap-parent gnus-article-edit-mode-map text-mode-map) |
17493 | 4134 |
4135 (gnus-define-keys gnus-article-edit-mode-map | |
4136 "\C-c\C-c" gnus-article-edit-done | |
4137 "\C-c\C-k" gnus-article-edit-exit) | |
4138 | |
4139 (gnus-define-keys (gnus-article-edit-wash-map | |
4140 "\C-c\C-w" gnus-article-edit-mode-map) | |
4141 "f" gnus-article-edit-full-stops)) | |
4142 | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4143 (define-derived-mode gnus-article-edit-mode message-mode "Article Edit" |
17493 | 4144 "Major mode for editing articles. |
4145 This is an extended text-mode. | |
4146 | |
4147 \\{gnus-article-edit-mode-map}" | |
4148 (make-local-variable 'gnus-article-edit-done-function) | |
4149 (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
|
4150 (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
|
4151 '(message-font-lock-keywords t)) |
17493 | 4152 (setq buffer-read-only nil) |
4153 (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
|
4154 (widen)) |
17493 | 4155 |
4156 (defun gnus-article-edit (&optional force) | |
4157 "Edit the current article. | |
4158 This will have permanent effect only in mail groups. | |
4159 If FORCE is non-nil, allow editing of articles even in read-only | |
4160 groups." | |
4161 (interactive "P") | |
4162 (when (and (not force) | |
4163 (gnus-group-read-only-p)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4164 (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
|
4165 (gnus-article-date-original) |
17493 | 4166 (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
|
4167 'ignore |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4168 `(lambda (no-highlight) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4169 'ignore |
17493 | 4170 (gnus-summary-edit-article-done |
4171 ,(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
|
4172 ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))) |
17493 | 4173 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4174 (defun gnus-article-edit-article (start-func exit-func) |
17493 | 4175 "Start editing the contents of the current article buffer." |
4176 (let ((winconf (current-window-configuration))) | |
4177 (set-buffer gnus-article-buffer) | |
4178 (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
|
4179 (funcall start-func) |
17493 | 4180 (gnus-configure-windows 'edit-article) |
4181 (setq gnus-article-edit-done-function exit-func) | |
4182 (setq gnus-prev-winconf winconf) | |
4183 (gnus-message 6 "C-c C-c to end edits"))) | |
4184 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4185 (defun gnus-article-edit-done (&optional arg) |
17493 | 4186 "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
|
4187 (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
|
4188 (widen) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4189 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4190 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4191 (when (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4192 (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
|
4193 (length (- (point-max) (point))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4194 (case-fold-search t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4195 (body (copy-marker (point)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4196 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4197 (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
|
4198 (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
|
4199 (insert (number-to-string length))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4200 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4201 (when (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4202 "^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
|
4203 (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
|
4204 (insert (number-to-string length))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4205 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4206 (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
|
4207 (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
|
4208 (insert (number-to-string lines))))))) |
17493 | 4209 (let ((func gnus-article-edit-done-function) |
4210 (buf (current-buffer)) | |
4211 (start (window-start))) | |
4212 (gnus-article-edit-exit) | |
4213 (save-excursion | |
4214 (set-buffer buf) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4215 (let ((inhibit-read-only t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4216 (funcall func arg)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4217 ;; 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
|
4218 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4219 (gnus-backlog-remove-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4220 (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
|
4221 ;; 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
|
4222 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4223 (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
|
4224 (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
|
4225 (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
|
4226 (when gnus-use-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4227 (gnus-cache-update-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4228 (car gnus-article-current) (cdr gnus-article-current)))) |
17493 | 4229 (set-buffer buf) |
4230 (set-window-start (get-buffer-window buf) start) | |
4231 (set-window-point (get-buffer-window buf) (point)))) | |
4232 | |
4233 (defun gnus-article-edit-exit () | |
4234 "Exit the article editing without updating." | |
4235 (interactive) | |
4236 ;; 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
|
4237 (let ((buf (buffer-substring-no-properties (point-min) (point-max))) |
17493 | 4238 (curbuf (current-buffer)) |
4239 (p (point)) | |
4240 (window-start (window-start))) | |
4241 (erase-buffer) | |
4242 (insert buf) | |
4243 (let ((winconf gnus-prev-winconf)) | |
4244 (gnus-article-mode) | |
4245 (set-window-configuration winconf) | |
4246 ;; 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
|
4247 (save-current-buffer |
17493 | 4248 (set-buffer curbuf) |
4249 (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
|
4250 (goto-char p))))) |
17493 | 4251 |
4252 (defun gnus-article-edit-full-stops () | |
4253 "Interactively repair spacing at end of sentences." | |
4254 (interactive) | |
4255 (save-excursion | |
4256 (goto-char (point-min)) | |
4257 (search-forward-regexp "^$" nil t) | |
4258 (let ((case-fold-search nil)) | |
4259 (query-replace-regexp "\\([.!?][])}]* \\)\\([[({A-Z]\\)" "\\1 \\2")))) | |
4260 | |
4261 ;;; | |
4262 ;;; Article highlights | |
4263 ;;; | |
4264 | |
4265 ;; Written by Per Abrahamsen <abraham@iesd.auc.dk>. | |
4266 | |
4267 ;;; Internal Variables: | |
4268 | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4269 (defcustom gnus-button-url-regexp |
46967
3b7e1c7a2739
* gnus-art.el (gnus-button-url-regexp): Use POSIX regexp if possible.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
45317
diff
changeset
|
4270 (if (string-match "[[:digit:]]" "1") ;; support POSIX? |
3b7e1c7a2739
* gnus-art.el (gnus-button-url-regexp): Use POSIX regexp if possible.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
45317
diff
changeset
|
4271 "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)" |
3b7e1c7a2739
* gnus-art.el (gnus-button-url-regexp): Use POSIX regexp if possible.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
45317
diff
changeset
|
4272 "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)") |
17493 | 4273 "Regular expression that matches URLs." |
4274 :group 'gnus-article-buttons | |
4275 :type 'regexp) | |
4276 | |
4277 (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
|
4278 `(("<\\(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
|
4279 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
|
4280 ("\\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
|
4281 ("\\(\\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
|
4282 1 t |
17493 | 4283 gnus-button-fetch-group 4) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4284 ("\\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
|
4285 ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 |
17493 | 4286 t gnus-button-message-id 3) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4287 ("\\(<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
|
4288 ("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
|
4289 ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) |
17493 | 4290 ;; 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
|
4291 ("<URL: *\\([^<>]*\\)>" 0 t gnus-button-embedded-url 1) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4292 ;; Info manual references. |
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4293 ("(\\(info\\|Info-goto-node\\)[ \n\t]+\"\\(([^)\"\n]+)[^\"\n]+\\)\")" |
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4294 0 t Info-goto-node 2) |
17493 | 4295 ;; Raw URLs. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4296 (,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
|
4297 "*Alist of regexps matching buttons in article bodies. |
17493 | 4298 |
4299 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where | |
4300 REGEXP: is the string matching text around the button, | |
4301 BUTTON: is the number of the regexp grouping actually matching the button, | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4302 FORM: is a Lisp expression which must eval to true for the button to |
17493 | 4303 be added, |
4304 CALLBACK: is the function to call when the user push this button, and each | |
4305 PAR: is a number of a regexp grouping whose text will be passed to CALLBACK. | |
4306 | |
4307 CALLBACK can also be a variable, in that case the value of that | |
4308 variable it the real callback function." | |
4309 :group 'gnus-article-buttons | |
4310 :type '(repeat (list regexp | |
4311 (integer :tag "Button") | |
4312 (sexp :tag "Form") | |
4313 (function :tag "Callback") | |
4314 (repeat :tag "Par" | |
4315 :inline t | |
4316 (integer :tag "Regexp group"))))) | |
4317 | |
4318 (defcustom gnus-header-button-alist | |
4319 `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" | |
4320 0 t gnus-button-message-id 0) | |
4321 ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) | |
4322 ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" | |
4323 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
|
4324 ("^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
|
4325 ("^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
|
4326 ("^[^:]+:" ,gnus-button-url-regexp 0 t browse-url 0) |
17493 | 4327 ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t |
4328 gnus-button-message-id 3)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4329 "*Alist of headers and regexps to match buttons in article heads. |
17493 | 4330 |
4331 This alist is very similar to `gnus-button-alist', except that each | |
4332 alist has an additional HEADER element first in each entry: | |
4333 | |
4334 \(HEADER REGEXP BUTTON FORM CALLBACK PAR) | |
4335 | |
4336 HEADER is a regexp to match a header. For a fuller explanation, see | |
4337 `gnus-button-alist'." | |
4338 :group 'gnus-article-buttons | |
4339 :group 'gnus-article-headers | |
4340 :type '(repeat (list (regexp :tag "Header") | |
4341 regexp | |
4342 (integer :tag "Button") | |
4343 (sexp :tag "Form") | |
4344 (function :tag "Callback") | |
4345 (repeat :tag "Par" | |
4346 :inline t | |
4347 (integer :tag "Regexp group"))))) | |
4348 | |
4349 (defvar gnus-button-regexp nil) | |
4350 (defvar gnus-button-marker-list nil) | |
4351 ;; Regexp matching any of the regexps from `gnus-button-alist'. | |
4352 | |
4353 (defvar gnus-button-last nil) | |
4354 ;; The value of `gnus-button-alist' when `gnus-button-regexp' was build. | |
4355 | |
4356 ;;; Commands: | |
4357 | |
4358 (defun gnus-article-push-button (event) | |
4359 "Check text under the mouse pointer for a callback function. | |
4360 If the text under the mouse pointer has a `gnus-callback' property, | |
4361 call it with the value of the `gnus-data' text property." | |
4362 (interactive "e") | |
4363 (set-buffer (window-buffer (posn-window (event-start event)))) | |
4364 (let* ((pos (posn-point (event-start event))) | |
4365 (data (get-text-property pos 'gnus-data)) | |
4366 (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
|
4367 (goto-char pos) |
17493 | 4368 (when fun |
4369 (funcall fun data)))) | |
4370 | |
4371 (defun gnus-article-press-button () | |
4372 "Check text at point for a callback function. | |
4373 If the text at point has a `gnus-callback' property, | |
4374 call it with the value of the `gnus-data' text property." | |
4375 (interactive) | |
4376 (let* ((data (get-text-property (point) 'gnus-data)) | |
4377 (fun (get-text-property (point) 'gnus-callback))) | |
4378 (when fun | |
4379 (funcall fun data)))) | |
4380 | |
4381 (defun gnus-article-highlight (&optional force) | |
4382 "Highlight current article. | |
4383 This function calls `gnus-article-highlight-headers', | |
4384 `gnus-article-highlight-citation', | |
4385 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
4386 do the highlighting. See the documentation for those functions." | |
4387 (interactive (list 'force)) | |
4388 (gnus-article-highlight-headers) | |
4389 (gnus-article-highlight-citation force) | |
4390 (gnus-article-highlight-signature) | |
4391 (gnus-article-add-buttons force) | |
4392 (gnus-article-add-buttons-to-head)) | |
4393 | |
4394 (defun gnus-article-highlight-some (&optional force) | |
4395 "Highlight current article. | |
4396 This function calls `gnus-article-highlight-headers', | |
4397 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
4398 do the highlighting. See the documentation for those functions." | |
4399 (interactive (list 'force)) | |
4400 (gnus-article-highlight-headers) | |
4401 (gnus-article-highlight-signature) | |
4402 (gnus-article-add-buttons)) | |
4403 | |
4404 (defun gnus-article-highlight-headers () | |
4405 "Highlight article headers as specified by `gnus-header-face-alist'." | |
4406 (interactive) | |
4407 (save-excursion | |
4408 (set-buffer gnus-article-buffer) | |
4409 (save-restriction | |
4410 (let ((alist gnus-header-face-alist) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4411 (inhibit-read-only t) |
17493 | 4412 (case-fold-search t) |
4413 (inhibit-point-motion-hooks t) | |
4414 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
|
4415 (article-narrow-to-head) |
17493 | 4416 (while (setq entry (pop alist)) |
4417 (goto-char (point-min)) | |
4418 (setq regexp (concat "^\\(" | |
4419 (if (string-equal "" (nth 0 entry)) | |
4420 "[^\t ]" | |
4421 (nth 0 entry)) | |
4422 "\\)") | |
4423 header-face (nth 1 entry) | |
4424 field-face (nth 2 entry)) | |
4425 (while (and (re-search-forward regexp nil t) | |
4426 (not (eobp))) | |
4427 (beginning-of-line) | |
4428 (setq from (point)) | |
4429 (unless (search-forward ":" nil t) | |
4430 (forward-char 1)) | |
4431 (when (and header-face | |
4432 (not (memq (point) hpoints))) | |
4433 (push (point) hpoints) | |
4434 (gnus-put-text-property from (point) 'face header-face)) | |
4435 (when (and field-face | |
4436 (not (memq (setq from (point)) fpoints))) | |
4437 (push from fpoints) | |
4438 (if (re-search-forward "^[^ \t]" nil t) | |
4439 (forward-char -2) | |
4440 (goto-char (point-max))) | |
4441 (gnus-put-text-property from (point) 'face field-face)))))))) | |
4442 | |
4443 (defun gnus-article-highlight-signature () | |
4444 "Highlight the signature in an article. | |
4445 It does this by highlighting everything after | |
4446 `gnus-signature-separator' using `gnus-signature-face'." | |
4447 (interactive) | |
4448 (save-excursion | |
4449 (set-buffer gnus-article-buffer) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4450 (let ((inhibit-read-only t) |
17493 | 4451 (inhibit-point-motion-hooks t)) |
4452 (save-restriction | |
4453 (when (and gnus-signature-face | |
4454 (gnus-article-narrow-to-signature)) | |
4455 (gnus-overlay-put (gnus-make-overlay (point-min) (point-max)) | |
4456 'face gnus-signature-face) | |
4457 (widen) | |
4458 (gnus-article-search-signature) | |
4459 (let ((start (match-beginning 0)) | |
4460 (end (set-marker (make-marker) (1+ (match-end 0))))) | |
4461 (gnus-article-add-button start (1- end) 'gnus-signature-toggle | |
4462 end))))))) | |
4463 | |
4464 (defun gnus-button-in-region-p (b e prop) | |
4465 "Say whether PROP exists in the region." | |
4466 (text-property-not-all b e prop nil)) | |
4467 | |
4468 (defun gnus-article-add-buttons (&optional force) | |
4469 "Find external references in the article and make buttons of them. | |
4470 \"External references\" are things like Message-IDs and URLs, as | |
4471 specified by `gnus-button-alist'." | |
4472 (interactive (list 'force)) | |
4473 (save-excursion | |
4474 (set-buffer gnus-article-buffer) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4475 (let ((inhibit-read-only t) |
17493 | 4476 (inhibit-point-motion-hooks t) |
4477 (case-fold-search t) | |
4478 (alist gnus-button-alist) | |
4479 beg entry regexp) | |
4480 ;; 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
|
4481 (let (marker entry new-list) |
17493 | 4482 (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
|
4483 (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
|
4484 (push marker new-list) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4485 (goto-char marker) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4486 (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
|
4487 (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
|
4488 (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
|
4489 'gnus-callback nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4490 (set-marker marker nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4491 (setq gnus-button-marker-list new-list)) |
17493 | 4492 ;; 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
|
4493 (article-goto-body) |
17493 | 4494 (setq beg (point)) |
4495 (while (setq entry (pop alist)) | |
4496 (setq regexp (car entry)) | |
4497 (goto-char beg) | |
4498 (while (re-search-forward regexp nil t) | |
4499 (let* ((start (and entry (match-beginning (nth 1 entry)))) | |
4500 (end (and entry (match-end (nth 1 entry)))) | |
4501 (from (match-beginning 0))) | |
4502 (when (and (or (eq t (nth 2 entry)) | |
4503 (eval (nth 2 entry))) | |
4504 (not (gnus-button-in-region-p | |
4505 start end 'gnus-callback))) | |
4506 ;; That optional form returned non-nil, so we add the | |
4507 ;; button. | |
4508 (gnus-article-add-button | |
4509 start end 'gnus-button-push | |
4510 (car (push (set-marker (make-marker) from) | |
4511 gnus-button-marker-list)))))))))) | |
4512 | |
4513 ;; Add buttons to the head of an article. | |
4514 (defun gnus-article-add-buttons-to-head () | |
4515 "Add buttons to the head of the article." | |
4516 (interactive) | |
4517 (save-excursion | |
4518 (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
|
4519 (save-restriction |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4520 (let ((inhibit-read-only t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4521 (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
|
4522 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4523 (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
|
4524 entry beg end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4525 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4526 (while alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4527 ;; Each alist entry. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4528 (setq entry (car alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4529 alist (cdr alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4530 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4531 (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
|
4532 ;; 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
|
4533 (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
|
4534 (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
|
4535 (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4536 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4537 (goto-char beg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4538 (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
|
4539 ;; 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
|
4540 (let* ((entry (cdr entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4541 (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
|
4542 (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
|
4543 (form (nth 2 entry))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4544 (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
|
4545 (when (eval form) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4546 (gnus-article-add-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4547 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
|
4548 (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
|
4549 (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
|
4550 (goto-char end))))))) |
17493 | 4551 |
4552 ;;; External functions: | |
4553 | |
4554 (defun gnus-article-add-button (from to fun &optional data) | |
4555 "Create a button between FROM and TO with callback FUN and data DATA." | |
4556 (when gnus-article-button-face | |
4557 (gnus-overlay-put (gnus-make-overlay from to) | |
4558 'face gnus-article-button-face)) | |
4559 (gnus-add-text-properties | |
4560 from to | |
4561 (nconc (and gnus-article-mouse-face | |
4562 (list gnus-mouse-face-prop gnus-article-mouse-face)) | |
4563 (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
|
4564 (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
|
4565 (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
|
4566 :button-keymap gnus-widget-button-keymap)) |
17493 | 4567 |
4568 ;;; Internal functions: | |
4569 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4570 (defun gnus-article-set-globals () |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4571 (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4572 (set-buffer gnus-summary-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4573 (gnus-set-global-variables))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
4574 |
17493 | 4575 (defun gnus-signature-toggle (end) |
4576 (save-excursion | |
4577 (set-buffer gnus-article-buffer) | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4578 (let ((inhibit-read-only t) |
17493 | 4579 (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
|
4580 (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
|
4581 (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
|
4582 '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
|
4583 (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
|
4584 gnus-hidden-properties))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
4585 (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
|
4586 '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
|
4587 (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
|
4588 gnus-hidden-properties))))))) |
17493 | 4589 |
4590 (defun gnus-button-entry () | |
4591 ;; Return the first entry in `gnus-button-alist' matching this place. | |
4592 (let ((alist gnus-button-alist) | |
4593 (entry nil)) | |
4594 (while alist | |
4595 (setq entry (pop alist)) | |
4596 (if (looking-at (car entry)) | |
4597 (setq alist nil) | |
4598 (setq entry nil))) | |
4599 entry)) | |
4600 | |
4601 (defun gnus-button-push (marker) | |
4602 ;; Push button starting at MARKER. | |
4603 (save-excursion | |
4604 (goto-char marker) | |
4605 (let* ((entry (gnus-button-entry)) | |
4606 (inhibit-point-motion-hooks t) | |
4607 (fun (nth 3 entry)) | |
4608 (args (mapcar (lambda (group) | |
4609 (let ((string (match-string group))) | |
4610 (gnus-set-text-properties | |
4611 0 (length string) nil string) | |
4612 string)) | |
4613 (nthcdr 4 entry)))) | |
4614 (cond | |
4615 ((fboundp fun) | |
4616 (apply fun args)) | |
4617 ((and (boundp fun) | |
4618 (fboundp (symbol-value fun))) | |
4619 (apply (symbol-value fun) args)) | |
4620 (t | |
4621 (gnus-message 1 "You must define `%S' to use this button" | |
4622 (cons fun args))))))) | |
4623 | |
4624 (defun gnus-button-message-id (message-id) | |
4625 "Fetch MESSAGE-ID." | |
4626 (save-excursion | |
4627 (set-buffer gnus-summary-buffer) | |
4628 (gnus-summary-refer-article message-id))) | |
4629 | |
4630 (defun gnus-button-fetch-group (address) | |
4631 "Fetch GROUP specified by ADDRESS." | |
4632 (if (not (string-match "[:/]" address)) | |
4633 ;; This is just a simple group url. | |
4634 (gnus-group-read-ephemeral-group address gnus-select-method) | |
4635 (if (not (string-match "^\\([^:/]+\\)\\(:\\([^/]+\\)/\\)?\\(.*\\)$" | |
4636 address)) | |
4637 (error "Can't parse %s" address) | |
4638 (gnus-group-read-ephemeral-group | |
4639 (match-string 4 address) | |
4640 `(nntp ,(match-string 1 address) | |
4641 (nntp-address ,(match-string 1 address)) | |
4642 (nntp-port-number ,(if (match-end 3) | |
4643 (match-string 3 address) | |
4644 "nntp"))))))) | |
4645 | |
4646 (defun gnus-url-parse-query-string (query &optional downcase) | |
4647 (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
|
4648 (setq pairs (split-string query "&")) |
17493 | 4649 (while pairs |
4650 (setq cur (car pairs) | |
4651 pairs (cdr pairs)) | |
4652 (if (not (string-match "=" cur)) | |
4653 nil ; Grace | |
4654 (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0))) | |
4655 val (gnus-url-unhex-string (substring cur (match-end 0) nil))) | |
4656 (if downcase | |
4657 (setq key (downcase key))) | |
4658 (setq cur (assoc key retval)) | |
4659 (if cur | |
4660 (setcdr cur (cons val (cdr cur))) | |
4661 (setq retval (cons (list key val) retval))))) | |
4662 retval)) | |
4663 | |
4664 (defun gnus-url-unhex (x) | |
4665 (if (> x ?9) | |
4666 (if (>= x ?a) | |
4667 (+ 10 (- x ?a)) | |
4668 (+ 10 (- x ?A))) | |
4669 (- x ?0))) | |
4670 | |
4671 (defun gnus-url-unhex-string (str &optional allow-newlines) | |
4672 "Remove %XXX embedded spaces, etc in a url. | |
4673 If optional second argument ALLOW-NEWLINES is non-nil, then allow the | |
4674 decoding of carriage returns and line feeds in the string, which is normally | |
4675 forbidden in URL encoding." | |
4676 (setq str (or str "")) | |
4677 (let ((tmp "") | |
4678 (case-fold-search t)) | |
4679 (while (string-match "%[0-9a-f][0-9a-f]" str) | |
4680 (let* ((start (match-beginning 0)) | |
4681 (ch1 (gnus-url-unhex (elt str (+ start 1)))) | |
4682 (code (+ (* 16 ch1) | |
4683 (gnus-url-unhex (elt str (+ start 2)))))) | |
4684 (setq tmp (concat | |
4685 tmp (substring str 0 start) | |
4686 (cond | |
4687 (allow-newlines | |
4688 (char-to-string code)) | |
4689 ((or (= code ?\n) (= code ?\r)) | |
4690 " ") | |
4691 (t (char-to-string code)))) | |
4692 str (substring str (match-end 0))))) | |
4693 (setq tmp (concat tmp str)) | |
4694 tmp)) | |
4695 | |
4696 (defun gnus-url-mailto (url) | |
4697 ;; Send mail to someone | |
4698 (when (string-match "mailto:/*\\(.*\\)" url) | |
4699 (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
|
4700 (let (to args subject func) |
17493 | 4701 (if (string-match (regexp-quote "?") url) |
4702 (setq to (gnus-url-unhex-string (substring url 0 (match-beginning 0))) | |
4703 args (gnus-url-parse-query-string | |
4704 (substring url (match-end 0) nil) t)) | |
4705 (setq to (gnus-url-unhex-string url))) | |
4706 (setq args (cons (list "to" to) args) | |
4707 subject (cdr-safe (assoc "subject" args))) | |
4708 (message-mail) | |
4709 (while args | |
4710 (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) | |
4711 (if (fboundp func) | |
4712 (funcall func) | |
4713 (message-position-on-field (caar args))) | |
4714 (insert (mapconcat 'identity (cdar args) ", ")) | |
4715 (setq args (cdr args))) | |
4716 (if subject | |
4717 (message-goto-body) | |
4718 (message-goto-subject)))) | |
4719 | |
4720 (defun gnus-button-mailto (address) | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4721 "Mail to ADDRESS." |
17493 | 4722 (set-buffer (gnus-copy-article-buffer)) |
4723 (message-reply address)) | |
4724 | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4725 (defalias 'gnus-button-reply 'message-reply) |
17493 | 4726 |
4727 (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
|
4728 "Activate ADDRESS with `browse-url'." |
23608
3805e63b8caf
(gnus-button-embedded-url, gnus-button-url):
Dave Love <fx@gnu.org>
parents:
23361
diff
changeset
|
4729 (browse-url (gnus-strip-whitespace address))) |
17493 | 4730 |
4731 ;;; Next/prev buttons in the article buffer. | |
4732 | |
4733 (defvar gnus-next-page-line-format "%{%(Next page...%)%}\n") | |
4734 (defvar gnus-prev-page-line-format "%{%(Previous page...%)%}\n") | |
4735 | |
4736 (defvar gnus-prev-page-map nil) | |
4737 (unless gnus-prev-page-map | |
4738 (setq gnus-prev-page-map (make-sparse-keymap)) | |
4739 (define-key gnus-prev-page-map gnus-mouse-2 'gnus-button-prev-page) | |
4740 (define-key gnus-prev-page-map "\r" 'gnus-button-prev-page)) | |
4741 | |
4742 (defun gnus-insert-prev-page-button () | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4743 (let ((inhibit-read-only t)) |
17493 | 4744 (gnus-eval-format |
4745 gnus-prev-page-line-format nil | |
4746 `(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
|
4747 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
|
4748 article-type annotation)))) |
17493 | 4749 |
4750 (defvar gnus-next-page-map nil) | |
4751 (unless gnus-next-page-map | |
4752 (setq gnus-next-page-map (make-keymap)) | |
4753 (suppress-keymap gnus-prev-page-map) | |
4754 (define-key gnus-next-page-map gnus-mouse-2 'gnus-button-next-page) | |
4755 (define-key gnus-next-page-map "\r" 'gnus-button-next-page)) | |
4756 | |
4757 (defun gnus-button-next-page () | |
4758 "Go to the next page." | |
4759 (interactive) | |
4760 (let ((win (selected-window))) | |
4761 (select-window (get-buffer-window gnus-article-buffer t)) | |
4762 (gnus-article-next-page) | |
4763 (select-window win))) | |
4764 | |
4765 (defun gnus-button-prev-page () | |
4766 "Go to the prev page." | |
4767 (interactive) | |
4768 (let ((win (selected-window))) | |
4769 (select-window (get-buffer-window gnus-article-buffer t)) | |
4770 (gnus-article-prev-page) | |
4771 (select-window win))) | |
4772 | |
4773 (defun gnus-insert-next-page-button () | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4774 (let ((inhibit-read-only t)) |
17493 | 4775 (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
|
4776 `(gnus-next |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
4777 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
|
4778 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
|
4779 article-type annotation)))) |
17493 | 4780 |
4781 (defun gnus-article-button-next-page (arg) | |
4782 "Go to the next page." | |
4783 (interactive "P") | |
4784 (let ((win (selected-window))) | |
4785 (select-window (get-buffer-window gnus-article-buffer t)) | |
4786 (gnus-article-next-page) | |
4787 (select-window win))) | |
4788 | |
4789 (defun gnus-article-button-prev-page (arg) | |
4790 "Go to the prev page." | |
4791 (interactive "P") | |
4792 (let ((win (selected-window))) | |
4793 (select-window (get-buffer-window gnus-article-buffer t)) | |
4794 (gnus-article-prev-page) | |
4795 (select-window win))) | |
4796 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4797 (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
|
4798 '(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
|
4799 "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
|
4800 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4801 This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4802 is FUNCTION, FUNCTION will be applied to all newsgroups. If item is a |
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
4803 \(REGEXP . FUNCTION), FUNCTION will be only applied to these newsgroups |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4804 whose names match REGEXP. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4805 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4806 For example: |
48588 | 4807 \((\"chinese\" . gnus-decode-encoded-word-region-by-guess) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4808 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
|
4809 (\"chinese\" . rfc1843-decode-region)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4810 ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4811 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4812 (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
|
4813 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4814 (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
|
4815 "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
|
4816 (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
|
4817 (eq gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4818 (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
|
4819 (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
|
4820 (mapcar (lambda (x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4821 (if (symbolp x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4822 (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
|
4823 (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
|
4824 (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
|
4825 (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
|
4826 (list (cdr x)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4827 gnus-decode-header-methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4828 (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
|
4829 (pop xlist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4830 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4831 (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
|
4832 (while xlist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4833 (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
|
4834 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4835 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4836 ;;; Treatment top-level handling. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4837 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4838 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4839 (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
|
4840 (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
|
4841 (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
|
4842 (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
|
4843 (treated-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4844 (or (not type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4845 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4846 (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
|
4847 (while list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4848 (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
|
4849 (throw 'found t))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4850 (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
|
4851 val elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4852 (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
|
4853 (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
|
4854 (setq val |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4855 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4856 (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
|
4857 (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
|
4858 (symbol-value (car elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4859 (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
|
4860 treated-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4861 (gnus-treat-predicate val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4862 (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
|
4863 highlightp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4864 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4865 (funcall (cadr elem))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4866 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4867 ;; Dynamic variables. |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4868 (eval-when-compile |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4869 (defvar part-number) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4870 (defvar total-parts) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4871 (defvar type) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4872 (defvar condition) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4873 (defvar length)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4874 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4875 (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
|
4876 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4877 ((null val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4878 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4879 ((and (listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4880 (stringp (car val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4881 (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
|
4882 (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
|
4883 val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4884 ((listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4885 (let ((pred (pop val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4886 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4887 ((eq pred 'or) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4888 (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
|
4889 ((eq pred 'and) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4890 (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
|
4891 ((eq pred 'not) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4892 (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
|
4893 ((eq pred 'typep) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4894 (equal (car val) type)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4895 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4896 (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
|
4897 (condition |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4898 (eq condition val)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4899 ((eq val t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4900 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4901 ((eq val 'head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4902 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4903 ((eq val 'last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4904 (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
|
4905 ((numberp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4906 (< length val)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4907 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4908 (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
|
4909 |
17493 | 4910 (gnus-ems-redefine) |
4911 | |
4912 (provide 'gnus-art) | |
4913 | |
4914 (run-hooks 'gnus-art-load-hook) | |
4915 | |
52401 | 4916 ;;; arch-tag: 2654516f-6279-48f9-a83b-05c1fa450c33 |
17493 | 4917 ;;; gnus-art.el ends here |