Mercurial > emacs
annotate lisp/gnus/gnus-art.el @ 70806:1727784ff9ff
(dired-mode-map): Don't bind M-g.
author | Romain Francoise <romain@orebokech.com> |
---|---|
date | Sun, 21 May 2006 08:33:46 +0000 |
parents | 1b78f3a87f16 |
children | 70b055c73c8c 146cd8369025 |
rev | line source |
---|---|
17493 | 1 ;;; gnus-art.el --- article mode commands for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64735
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64735
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
68207
diff
changeset
|
4 ;; 2005, 2006 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 | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
17493 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
30 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
31 (require 'cl) |
65271
cc26a4d49a18
(w3m-minor-mode-map): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
65130
diff
changeset
|
32 (defvar tool-bar-map) |
cc26a4d49a18
(w3m-minor-mode-map): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
65130
diff
changeset
|
33 (defvar w3m-minor-mode-map)) |
19521
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
34 |
17493 | 35 (require 'gnus) |
36 (require 'gnus-sum) | |
37 (require 'gnus-spec) | |
38 (require 'gnus-int) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
39 (require 'gnus-win) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
40 (require 'mm-bodies) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
41 (require 'mail-parse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
42 (require 'mm-decode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
43 (require 'mm-view) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
44 (require 'wid-edit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
45 (require 'mm-uu) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
46 (require 'message) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
47 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
48 (autoload 'gnus-msg-mail "gnus-msg" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
49 (autoload 'gnus-button-mailto "gnus-msg") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
50 (autoload 'gnus-button-reply "gnus-msg" nil t) |
61304
a1964e18a9ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-234
Miles Bader <miles@gnu.org>
parents:
60696
diff
changeset
|
51 (autoload 'parse-time-string "parse-time" nil nil) |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
52 (autoload 'mm-extern-cache-contents "mm-extern") |
17493 | 53 |
54 (defgroup gnus-article nil | |
55 "Article display." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
56 :link '(custom-manual "(gnus)Article Buffer") |
17493 | 57 :group 'gnus) |
58 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
59 (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
|
60 "Treating article parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
61 :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
|
62 :group 'gnus-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
63 |
17493 | 64 (defgroup gnus-article-hiding nil |
65 "Hiding article parts." | |
66 :link '(custom-manual "(gnus)Article Hiding") | |
67 :group 'gnus-article) | |
68 | |
69 (defgroup gnus-article-highlight nil | |
70 "Article highlighting." | |
71 :link '(custom-manual "(gnus)Article Highlighting") | |
72 :group 'gnus-article | |
73 :group 'gnus-visual) | |
74 | |
75 (defgroup gnus-article-signature nil | |
76 "Article signatures." | |
77 :link '(custom-manual "(gnus)Article Signature") | |
78 :group 'gnus-article) | |
79 | |
80 (defgroup gnus-article-headers nil | |
81 "Article headers." | |
82 :link '(custom-manual "(gnus)Hiding Headers") | |
83 :group 'gnus-article) | |
84 | |
85 (defgroup gnus-article-washing nil | |
86 "Special commands on articles." | |
87 :link '(custom-manual "(gnus)Article Washing") | |
88 :group 'gnus-article) | |
89 | |
90 (defgroup gnus-article-emphasis nil | |
91 "Fontisizing articles." | |
92 :link '(custom-manual "(gnus)Article Fontisizing") | |
93 :group 'gnus-article) | |
94 | |
95 (defgroup gnus-article-saving nil | |
96 "Saving articles." | |
97 :link '(custom-manual "(gnus)Saving Articles") | |
98 :group 'gnus-article) | |
99 | |
100 (defgroup gnus-article-mime nil | |
101 "Worshiping the MIME wonder." | |
102 :link '(custom-manual "(gnus)Using MIME") | |
103 :group 'gnus-article) | |
104 | |
105 (defgroup gnus-article-buttons nil | |
106 "Pushable buttons in the article buffer." | |
107 :link '(custom-manual "(gnus)Article Buttons") | |
108 :group 'gnus-article) | |
109 | |
110 (defgroup gnus-article-various nil | |
111 "Other article options." | |
112 :link '(custom-manual "(gnus)Misc Article") | |
113 :group 'gnus-article) | |
114 | |
115 (defcustom gnus-ignored-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
116 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
117 (lambda (header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
118 (concat "^" header ":")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
119 '("Path" "Expires" "Date-Received" "References" "Xref" "Lines" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
120 "Relay-Version" "Message-ID" "Approved" "Sender" "Received" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
121 "X-UIDL" "MIME-Version" "Return-Path" "In-Reply-To" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
122 "Content-Type" "Content-Transfer-Encoding" "X-WebTV-Signature" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
123 "X-MimeOLE" "X-MSMail-Priority" "X-Priority" "X-Loop" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
124 "X-Authentication-Warning" "X-MIME-Autoconverted" "X-Face" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
125 "X-Attribution" "X-Originating-IP" "Delivered-To" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
126 "NNTP-[-A-Za-z]+" "Distribution" "X-no-archive" "X-Trace" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
127 "X-Complaints-To" "X-NNTP-Posting-Host" "X-Orig.*" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
128 "Abuse-Reports-To" "Cache-Post-Path" "X-Article-Creation-Date" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
129 "X-Poster" "X-Mail2News-Path" "X-Server-Date" "X-Cache" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
130 "Originator" "X-Problems-To" "X-Auth-User" "X-Post-Time" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
131 "X-Admin" "X-UID" "Resent-[-A-Za-z]+" "X-Mailing-List" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
132 "Precedence" "Original-[-A-Za-z]+" "X-filename" "X-Orcpt" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
133 "Old-Received" "X-Pgp" "X-Auth" "X-From-Line" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
134 "X-Gnus-Article-Number" "X-Majordomo" "X-Url" "X-Sender" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
135 "MBOX-Line" "Priority" "X400-[-A-Za-z]+" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
136 "Status" "X-Gnus-Mail-Source" "Cancel-Lock" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
137 "X-FTN" "X-EXP32-SerialNo" "Encoding" "Importance" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
138 "Autoforwarded" "Original-Encoded-Information-Types" "X-Ya-Pop3" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
139 "X-Face-Version" "X-Vms-To" "X-ML-NAME" "X-ML-COUNT" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
140 "Mailing-List" "X-finfo" "X-md5sum" "X-md5sum-Origin" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
141 "X-Sun-Charset" "X-Accept-Language" "X-Envelope-Sender" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
142 "List-[A-Za-z]+" "X-Listprocessor-Version" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
143 "X-Received" "X-Distribute" "X-Sequence" "X-Juno-Line-Breaks" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
144 "X-Notes-Item" "X-MS-TNEF-Correlator" "x-uunet-gateway" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
145 "X-Received" "Content-length" "X-precedence" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
146 "X-Authenticated-User" "X-Comment" "X-Report" "X-Abuse-Info" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
147 "X-HTTP-Proxy" "X-Mydeja-Info" "X-Copyright" "X-No-Markup" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
148 "X-Abuse-Info" "X-From_" "X-Accept-Language" "Errors-To" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
149 "X-BeenThere" "X-Mailman-Version" "List-Help" "List-Post" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
150 "List-Subscribe" "List-Id" "List-Unsubscribe" "List-Archive" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
151 "X-Content-length" "X-Posting-Agent" "Original-Received" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
152 "X-Request-PGP" "X-Fingerprint" "X-WRIEnvto" "X-WRIEnvfrom" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
153 "X-Virus-Scanned" "X-Delivery-Agent" "Posted-Date" "X-Gateway" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
154 "X-Local-Origin" "X-Local-Destination" "X-UserInfo1" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
155 "X-Received-Date" "X-Hashcash" "Face" "X-DMCA-Notifications" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
156 "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
157 "*All headers that start with this regexp will be hidden. |
17493 | 158 This variable can also be a list of regexps of headers to be ignored. |
159 If `gnus-visible-headers' is non-nil, this variable will be ignored." | |
160 :type '(choice :custom-show nil | |
161 regexp | |
162 (repeat regexp)) | |
163 :group 'gnus-article-hiding) | |
164 | |
165 (defcustom gnus-visible-headers | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
166 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-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
|
167 "*All headers that do not match this regexp will be hidden. |
17493 | 168 This variable can also be a list of regexp of headers to remain visible. |
169 If this variable is non-nil, `gnus-ignored-headers' will be ignored." | |
170 :type '(repeat :value-to-internal (lambda (widget value) | |
171 (custom-split-regexp-maybe value)) | |
172 :match (lambda (widget value) | |
173 (or (stringp value) | |
174 (widget-editable-list-match widget value))) | |
175 regexp) | |
176 :group 'gnus-article-hiding) | |
177 | |
178 (defcustom gnus-sorted-header-list | |
179 '("^From:" "^Subject:" "^Summary:" "^Keywords:" "^Newsgroups:" | |
180 "^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
|
181 "*This variable is a list of regular expressions. |
17493 | 182 If it is non-nil, headers that match the regular expressions will |
183 be placed first in the article buffer in the sequence specified by | |
184 this list." | |
185 :type '(repeat regexp) | |
186 :group 'gnus-article-hiding) | |
187 | |
188 (defcustom gnus-boring-article-headers '(empty followup-to reply-to) | |
189 "Headers that are only to be displayed if they have interesting data. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
190 Possible values in this list are: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
191 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
192 'empty Headers with no content. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
193 'newsgroups Newsgroup identical to Gnus group. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
194 'to-address To identical to To-address. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
195 'to-list To identical to To-list. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
196 'cc-list CC identical to To-list. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
197 'followup-to Followup-to identical to Newsgroups. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
198 'reply-to Reply-to identical to From. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
199 'date Date less than four days old. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
200 'long-to To and/or Cc longer than 1024 characters. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
201 'many-to Multiple To and/or Cc." |
17493 | 202 :type '(set (const :tag "Headers with no content." empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
203 (const :tag "Newsgroups identical to Gnus group." newsgroups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
204 (const :tag "To identical to To-address." to-address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
205 (const :tag "To identical to To-list." to-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
206 (const :tag "CC identical to To-list." cc-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
207 (const :tag "Followup-to identical to Newsgroups." followup-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
208 (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
|
209 (const :tag "Date less than four days old." date) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
210 (const :tag "To and/or Cc longer than 1024 characters." long-to) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
211 (const :tag "Multiple To and/or Cc headers." many-to)) |
17493 | 212 :group 'gnus-article-hiding) |
213 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
214 (defcustom gnus-article-skip-boring nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
215 "Skip over text that is not worth reading. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
216 By default, if you set this t, then Gnus will display citations and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
217 signatures, but will never scroll down to show you a page consisting |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
218 only of boring text. Boring text is controlled by |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
219 `gnus-article-boring-faces'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
220 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
221 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
222 :group 'gnus-article-hiding) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
223 |
17493 | 224 (defcustom gnus-signature-separator '("^-- $" "^-- *$") |
225 "Regexp matching signature separator. | |
226 This can also be a list of regexps. In that case, it will be checked | |
227 from head to tail looking for a separator. Searches will be done from | |
228 the end of the buffer." | |
67643
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
229 :type '(choice :format "%{%t%}: %[Value Menu%]\n%v" |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
230 (regexp) |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
231 (repeat :tag "List of regexp" regexp)) |
17493 | 232 :group 'gnus-article-signature) |
233 | |
234 (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
|
235 "Provide a limit to what is considered a signature. |
17493 | 236 If it is a number, no signature may not be longer (in characters) than |
237 that number. If it is a floating point number, no signature may be | |
238 longer (in lines) than that number. If it is a function, the function | |
239 will be called without any parameters, and if it returns nil, there is | |
240 no signature in the buffer. If it is a string, it will be used as a | |
241 regexp. If it matches, the text in question is not a signature." | |
65342
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
65271
diff
changeset
|
242 :type '(choice (const nil) |
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
65271
diff
changeset
|
243 (integer :value 200) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
244 (number :value 4.0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
245 (function :value fun) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
246 (regexp :value ".*")) |
17493 | 247 :group 'gnus-article-signature) |
248 | |
249 (defcustom gnus-hidden-properties '(invisible t intangible t) | |
250 "Property list to use for hiding text." | |
251 :type 'sexp | |
252 :group 'gnus-article-hiding) | |
253 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
254 ;; Fixme: This isn't the right thing for mixed graphical and non-graphical |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
255 ;; frames in a session. |
17493 | 256 (defcustom gnus-article-x-face-command |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
257 (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
258 (if (or (gnus-image-type-available-p 'xface) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
259 (gnus-image-type-available-p 'pbm)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
260 'gnus-display-x-face-in-from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
261 "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | ee -") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
262 (if (gnus-image-type-available-p 'pbm) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
263 'gnus-display-x-face-in-from |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
264 "{ 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
|
265 display -")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
266 "*String or function to be executed to display an X-Face header. |
17493 | 267 If it is a string, the command will be executed in a sub-shell |
268 asynchronously. The compressed face will be piped to this command." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
269 :type `(choice string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
270 (function-item gnus-display-x-face-in-from) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
271 function) |
35759 | 272 :version "21.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
273 :group 'gnus-picon |
17493 | 274 :group 'gnus-article-washing) |
275 | |
276 (defcustom gnus-article-x-face-too-ugly nil | |
277 "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
|
278 :type '(choice regexp (const nil)) |
17493 | 279 :group 'gnus-article-washing) |
280 | |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
281 (defcustom gnus-article-banner-alist nil |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
282 "Banner alist for stripping. |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
283 For example, |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
284 ((egroups . \"^[ \\t\\n]*-------------------+\\\\( \\\\(e\\\\|Yahoo! \\\\)Groups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))" |
33397 | 285 :version "21.1" |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
286 :type '(repeat (cons symbol regexp)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
287 :group 'gnus-article-washing) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
288 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
289 (gnus-define-group-parameter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
290 banner |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
291 :variable-document |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
292 "Alist of regexps (to match group names) and banner." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
293 :variable-group gnus-article-washing |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
294 :parameter-type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
295 '(choice :tag "Banner" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
296 :value nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
297 (const :tag "Remove signature" signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
298 (symbol :tag "Item in `gnus-article-banner-alist'" none) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
299 regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
300 (const :tag "None" nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
301 :parameter-document |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
302 "If non-nil, specify how to remove `banners' from articles. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
303 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
304 Symbol `signature' means to remove signatures delimited by |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
305 `gnus-signature-separator'. Any other symbol is used to look up a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
306 regular expression to match the banner in `gnus-article-banner-alist'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
307 A string is used as a regular expression to match the banner |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
308 directly.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
309 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
310 (defcustom gnus-article-address-banner-alist nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
311 "Alist of mail addresses and banners. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
312 Each element has the form (ADDRESS . BANNER), where ADDRESS is a regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
313 to match a mail address in the From: header, BANNER is one of a symbol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
314 `signature', an item in `gnus-article-banner-alist', a regexp and nil. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
315 If ADDRESS matches author's mail address, it will remove things like |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
316 advertisements. For example: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
317 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
318 \((\"@yoo-hoo\\\\.co\\\\.jp\\\\'\" . \"\\n_+\\nDo You Yoo-hoo!\\\\?\\n.*\\n.*\\n\")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
319 " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
320 :type '(repeat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
321 (cons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
322 (regexp :tag "Address") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
323 (choice :tag "Banner" :value nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
324 (const :tag "Remove signature" signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
325 (symbol :tag "Item in `gnus-article-banner-alist'" none) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
326 regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
327 (const :tag "None" nil)))) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
328 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
329 :group 'gnus-article-washing) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
330 |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
331 (defmacro gnus-emphasis-custom-with-format (&rest body) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
332 `(let ((format "\ |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
333 \\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\ |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
334 \\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)")) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
335 ,@body)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
336 |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
337 (defun gnus-emphasis-custom-value-to-external (value) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
338 (gnus-emphasis-custom-with-format |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
339 (if (consp (car value)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
340 (list (format format (car (car value)) (cdr (car value))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
341 2 |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
342 (if (nth 1 value) 2 3) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
343 (nth 2 value)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
344 value))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
345 |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
346 (defun gnus-emphasis-custom-value-to-internal (value) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
347 (gnus-emphasis-custom-with-format |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
348 (let ((regexp (concat "\\`" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
349 (format (regexp-quote format) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
350 "\\([^()]+\\)" "\\([^()]+\\)") |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
351 "\\'")) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
352 pattern) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
353 (if (string-match regexp (setq pattern (car value))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
354 (list (cons (match-string 1 pattern) (match-string 2 pattern)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
355 (= (nth 2 value) 2) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
356 (nth 3 value)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
357 value)))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
358 |
17493 | 359 (defcustom gnus-emphasis-alist |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
360 (let ((types |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
361 '(("\\*" "\\*" bold nil 2) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
362 ("_" "_" underline) |
17493 | 363 ("/" "/" italic) |
364 ("_/" "/_" underline-italic) | |
365 ("_\\*" "\\*_" underline-bold) | |
366 ("\\*/" "/\\*" bold-italic) | |
367 ("_\\*/" "/\\*_" underline-bold-italic)))) | |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
368 (nconc |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
369 (gnus-emphasis-custom-with-format |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
370 (mapcar (lambda (spec) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
371 (list (format format (car spec) (cadr spec)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
372 (or (nth 3 spec) 2) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
373 (or (nth 4 spec) 3) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
374 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
375 types)) |
62978
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
376 '(;; I've never seen anyone use this strikethru convention whereas I've |
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
377 ;; several times seen it triggered by normal text. --Stef |
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
378 ;; Miles suggests that this form is sometimes used but for italics, |
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
379 ;; so maybe we should map it to `italic'. |
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
380 ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" |
c0f8b7d7e2ae
(gnus-emphasis-alist): Disable the strikethru thingy.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62943
diff
changeset
|
381 ;; 2 3 gnus-emphasis-strikethru) |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
382 ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
383 2 3 gnus-emphasis-underline)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
384 "*Alist that says how to fontify certain phrases. |
17493 | 385 Each item looks like this: |
386 | |
387 (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) | |
388 | |
389 The first element is a regular expression to be matched. The second | |
390 is a number that says what regular expression grouping used to find | |
391 the entire emphasized word. The third is a number that says what | |
392 regexp grouping should be displayed and highlighted. The fourth | |
393 is the face used for highlighting." | |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
394 :type |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
395 '(repeat |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
396 (menu-choice |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
397 :format "%[Customizing Style%]\n%v" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
398 :indent 2 |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
399 (group :tag "Default" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
400 :value ("" 0 0 default) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
401 :value-create |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
402 (lambda (widget) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
403 (let ((value (widget-get |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
404 (cadr (widget-get (widget-get widget :parent) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
405 :args)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
406 :value))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
407 (if (not (eq (nth 2 value) 'default)) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
408 (widget-put |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
409 widget |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
410 :value |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
411 (gnus-emphasis-custom-value-to-external value)))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
412 (widget-group-value-create widget)) |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58147
diff
changeset
|
413 regexp |
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58147
diff
changeset
|
414 (integer :format "Match group: %v") |
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58147
diff
changeset
|
415 (integer :format "Emphasize group: %v") |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
416 face) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
417 (group :tag "Simple" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
418 :value (("_" . "_") nil default) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
419 (cons :format "%v" |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58147
diff
changeset
|
420 (regexp :format "Start regexp: %v") |
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58147
diff
changeset
|
421 (regexp :format "End regexp: %v")) |
58147
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
422 (boolean :format "Show start and end patterns: %[%v%]\n" |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
423 :on " On " :off " Off ") |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
424 face))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
425 :get (lambda (symbol) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
426 (mapcar 'gnus-emphasis-custom-value-to-internal |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
427 (default-value symbol))) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
428 :set (lambda (symbol value) |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
429 (set-default symbol (mapcar 'gnus-emphasis-custom-value-to-external |
a46385598b7c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689
Miles Bader <miles@gnu.org>
parents:
57923
diff
changeset
|
430 value))) |
17493 | 431 :group 'gnus-article-emphasis) |
432 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
433 (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
|
434 "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
|
435 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
|
436 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
|
437 and the latter avoids underlining any whitespace at all." |
33397 | 438 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
439 :group 'gnus-article-emphasis |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
440 :type 'regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
441 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
442 (defface gnus-emphasis-bold '((t (:bold t))) |
17493 | 443 "Face used for displaying strong emphasized text (*word*)." |
444 :group 'gnus-article-emphasis) | |
445 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
446 (defface gnus-emphasis-italic '((t (:italic t))) |
17493 | 447 "Face used for displaying italic emphasized text (/word/)." |
448 :group 'gnus-article-emphasis) | |
449 | |
450 (defface gnus-emphasis-underline '((t (:underline t))) | |
451 "Face used for displaying underlined emphasized text (_word_)." | |
452 :group 'gnus-article-emphasis) | |
453 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
454 (defface gnus-emphasis-underline-bold '((t (:bold t :underline t))) |
17493 | 455 "Face used for displaying underlined bold emphasized text (_*word*_)." |
456 :group 'gnus-article-emphasis) | |
457 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
458 (defface gnus-emphasis-underline-italic '((t (:italic t :underline t))) |
25382
925a1c3dd62a
(gnus-emphasis-underline-italic): Doc fix.
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
459 "Face used for displaying underlined italic emphasized text (_/word/_)." |
17493 | 460 :group 'gnus-article-emphasis) |
461 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
462 (defface gnus-emphasis-bold-italic '((t (:bold t :italic t))) |
17493 | 463 "Face used for displaying bold italic emphasized text (/*word*/)." |
464 :group 'gnus-article-emphasis) | |
465 | |
466 (defface gnus-emphasis-underline-bold-italic | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
467 '((t (:bold t :italic t :underline t))) |
17493 | 468 "Face used for displaying underlined bold italic emphasized text. |
48588 | 469 Example: (_/*word*/_)." |
17493 | 470 :group 'gnus-article-emphasis) |
471 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
472 (defface gnus-emphasis-strikethru (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
473 '((t (:strikethru t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
474 '((t (:strike-through t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
475 "Face used for displaying strike-through text (-word-)." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
476 :group 'gnus-article-emphasis) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
477 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
478 (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
|
479 '((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
|
480 "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
|
481 :group 'gnus-article-emphasis) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
482 |
17493 | 483 (defcustom gnus-article-time-format "%a, %b %d %Y %T %Z" |
484 "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
|
485 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
|
486 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
487 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
|
488 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
|
489 be fed to `format-time-string'." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
490 :type '(choice string symbol) |
17493 | 491 :link '(custom-manual "(gnus)Article Date") |
492 :group 'gnus-article-washing) | |
493 | |
494 (defcustom gnus-save-all-headers t | |
495 "*If non-nil, don't remove any headers before saving." | |
496 :group 'gnus-article-saving | |
497 :type 'boolean) | |
498 | |
499 (defcustom gnus-prompt-before-saving 'always | |
500 "*This variable says how much prompting is to be done when saving articles. | |
501 If it is nil, no prompting will be done, and the articles will be | |
502 saved to the default files. If this variable is `always', each and | |
503 every article that is saved will be preceded by a prompt, even when | |
504 saving large batches of articles. If this variable is neither nil not | |
505 `always', there the user will be prompted once for a file name for | |
506 each invocation of the saving commands." | |
507 :group 'gnus-article-saving | |
508 :type '(choice (item always) | |
509 (item :tag "never" nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
510 (sexp :tag "once" :format "%t\n" :value t))) |
17493 | 511 |
512 (defcustom gnus-saved-headers gnus-visible-headers | |
513 "Headers to keep if `gnus-save-all-headers' is nil. | |
514 If `gnus-save-all-headers' is non-nil, this variable will be ignored. | |
515 If that variable is nil, however, all headers that match this regexp | |
516 will be kept while the rest will be deleted before saving." | |
517 :group 'gnus-article-saving | |
23361
86b5dc6c12f5
(gnus-article-x-face-too-ugly): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
22584
diff
changeset
|
518 :type 'regexp) |
17493 | 519 |
520 (defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail | |
521 "A function to save articles in your favourite format. | |
522 The function must be interactively callable (in other words, it must | |
523 be an Emacs command). | |
524 | |
525 Gnus provides the following functions: | |
526 | |
527 * gnus-summary-save-in-rmail (Rmail format) | |
528 * gnus-summary-save-in-mail (Unix mail format) | |
529 * gnus-summary-save-in-folder (MH folder) | |
530 * gnus-summary-save-in-file (article format) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
531 * gnus-summary-save-body-in-file (article body) |
17493 | 532 * gnus-summary-save-in-vm (use VM's folder format) |
533 * gnus-summary-write-to-file (article format -- overwrite)." | |
534 :group 'gnus-article-saving | |
535 :type '(radio (function-item gnus-summary-save-in-rmail) | |
536 (function-item gnus-summary-save-in-mail) | |
537 (function-item gnus-summary-save-in-folder) | |
538 (function-item gnus-summary-save-in-file) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
539 (function-item gnus-summary-save-body-in-file) |
17493 | 540 (function-item gnus-summary-save-in-vm) |
67418
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
541 (function-item gnus-summary-write-to-file) |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
66299
diff
changeset
|
542 (function))) |
17493 | 543 |
544 (defcustom gnus-rmail-save-name 'gnus-plain-save-name | |
545 "A function generating a file name to save articles in Rmail format. | |
546 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
547 :group 'gnus-article-saving | |
548 :type 'function) | |
549 | |
550 (defcustom gnus-mail-save-name 'gnus-plain-save-name | |
551 "A function generating a file name to save articles in Unix mail format. | |
552 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." | |
553 :group 'gnus-article-saving | |
554 :type 'function) | |
555 | |
556 (defcustom gnus-folder-save-name 'gnus-folder-save-name | |
557 "A function generating a file name to save articles in MH folder. | |
558 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER." | |
559 :group 'gnus-article-saving | |
560 :type 'function) | |
561 | |
562 (defcustom gnus-file-save-name 'gnus-numeric-save-name | |
563 "A function generating a file name to save articles in article format. | |
564 The function is called with NEWSGROUP, HEADERS, and optional | |
565 LAST-FILE." | |
566 :group 'gnus-article-saving | |
567 :type 'function) | |
568 | |
569 (defcustom gnus-split-methods | |
570 '((gnus-article-archive-name) | |
571 (gnus-article-nndoc-name)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
572 "*Variable used to suggest where articles are to be saved. |
17493 | 573 For instance, if you would like to save articles related to Gnus in |
574 the file \"gnus-stuff\", and articles related to VM in \"vm-stuff\", | |
575 you could set this variable to something like: | |
576 | |
577 '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\") | |
578 (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\")) | |
579 | |
580 This variable is an alist where the where the key is the match and the | |
581 value is a list of possible files to save in if the match is non-nil. | |
582 | |
583 If the match is a string, it is used as a regexp match on the | |
584 article. If the match is a symbol, that symbol will be funcalled | |
585 from the buffer of the article to be saved with the newsgroup as the | |
586 parameter. If it is a list, it will be evaled in the same buffer. | |
587 | |
588 If this form or function returns a string, this string will be used as | |
589 a possible file name; and if it returns a non-nil list, that list will | |
590 be used as possible file names." | |
591 :group 'gnus-article-saving | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
592 :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
|
593 (cons :value ("" "") regexp (repeat string)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
594 (sexp :value nil)))) |
17493 | 595 |
596 (defcustom gnus-page-delimiter "^\^L" | |
597 "*Regexp describing what to use as article page delimiters. | |
598 The default value is \"^\^L\", which is a form linefeed at the | |
599 beginning of a line." | |
600 :type 'regexp | |
601 :group 'gnus-article-various) | |
602 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
603 (defcustom gnus-article-mode-line-format "Gnus: %g [%w] %S%m" |
17493 | 604 "*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
|
605 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
|
606 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
607 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
|
608 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
609 %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
|
610 %m The number of MIME parts in the article." |
17493 | 611 :type 'string |
612 :group 'gnus-article-various) | |
613 | |
614 (defcustom gnus-article-mode-hook nil | |
615 "*A hook for Gnus article mode." | |
616 :type 'hook | |
617 :group 'gnus-article-various) | |
618 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
619 (when (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
620 ;; Extracted from gnus-xmas-define in order to preserve user settings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
621 (when (fboundp 'turn-off-scroll-in-place) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
622 (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
623 ;; Extracted from gnus-xmas-redefine in order to preserve user settings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
624 (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
625 |
17493 | 626 (defcustom gnus-article-menu-hook nil |
627 "*Hook run after the creation of the article mode menu." | |
628 :type 'hook | |
629 :group 'gnus-article-various) | |
630 | |
631 (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
|
632 "*A hook called after an article has been prepared in the article buffer." |
17493 | 633 :type 'hook |
634 :group 'gnus-article-various) | |
635 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
636 (make-obsolete-variable 'gnus-article-hide-pgp-hook |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
637 "This variable is obsolete in Gnus 5.10.") |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
638 |
17493 | 639 (defcustom gnus-article-button-face 'bold |
640 "Face used for highlighting buttons in the article buffer. | |
641 | |
642 An article button is a piece of text that you can activate by pressing | |
643 `RET' or `mouse-2' above it." | |
644 :type 'face | |
645 :group 'gnus-article-buttons) | |
646 | |
647 (defcustom gnus-article-mouse-face 'highlight | |
648 "Face used for mouse highlighting in the article buffer. | |
649 | |
650 Article buttons will be displayed in this face when the cursor is | |
651 above them." | |
652 :type 'face | |
653 :group 'gnus-article-buttons) | |
654 | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
655 (defcustom gnus-signature-face 'gnus-signature |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
656 "Face used for highlighting a signature in the article buffer. |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
657 Obsolete; use the face `gnus-signature' for customizations instead." |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
658 :type 'face |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
659 :group 'gnus-article-highlight |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
660 :group 'gnus-article-signature) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
661 |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
662 (defface gnus-signature |
32927
c0b62376988c
(gnus-signature-face): Use italics on all terminals that support it.
Jason Rumney <jasonr@gnu.org>
parents:
32210
diff
changeset
|
663 '((t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
664 (:italic t))) |
17493 | 665 "Face used for highlighting a signature in the article buffer." |
666 :group 'gnus-article-highlight | |
667 :group 'gnus-article-signature) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
668 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
669 (put 'gnus-signature-face 'face-alias 'gnus-signature) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
670 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
671 (defface gnus-header-from |
17493 | 672 '((((class color) |
673 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
674 (:foreground "spring green")) |
17493 | 675 (((class color) |
676 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
677 (:foreground "red3")) |
17493 | 678 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
679 (:italic t))) |
17493 | 680 "Face used for displaying from headers." |
681 :group 'gnus-article-headers | |
682 :group 'gnus-article-highlight) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
683 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
684 (put 'gnus-header-from-face 'face-alias 'gnus-header-from) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
685 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
686 (defface gnus-header-subject |
17493 | 687 '((((class color) |
688 (background dark)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
689 (:foreground "SeaGreen3")) |
17493 | 690 (((class color) |
691 (background light)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
692 (:foreground "red4")) |
17493 | 693 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
694 (:bold t :italic t))) |
17493 | 695 "Face used for displaying subject headers." |
696 :group 'gnus-article-headers | |
697 :group 'gnus-article-highlight) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
698 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
699 (put 'gnus-header-subject-face 'face-alias 'gnus-header-subject) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
700 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
701 (defface gnus-header-newsgroups |
17493 | 702 '((((class color) |
703 (background dark)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
704 (:foreground "yellow" :italic t)) |
17493 | 705 (((class color) |
706 (background light)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
707 (:foreground "MidnightBlue" :italic t)) |
17493 | 708 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
709 (:italic t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
710 "Face used for displaying newsgroups headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
711 In the default setup this face is only used for crossposted |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
712 articles." |
17493 | 713 :group 'gnus-article-headers |
714 :group 'gnus-article-highlight) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
715 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
716 (put 'gnus-header-newsgroups-face 'face-alias 'gnus-header-newsgroups) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
717 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
718 (defface gnus-header-name |
17493 | 719 '((((class color) |
720 (background dark)) | |
721 (:foreground "SeaGreen")) | |
722 (((class color) | |
723 (background light)) | |
724 (:foreground "maroon")) | |
725 (t | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
726 (:bold t))) |
17493 | 727 "Face used for displaying header names." |
728 :group 'gnus-article-headers | |
729 :group 'gnus-article-highlight) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
730 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
731 (put 'gnus-header-name-face 'face-alias 'gnus-header-name) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
732 |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
733 (defface gnus-header-content |
17493 | 734 '((((class color) |
735 (background dark)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
736 (:foreground "forest green" :italic t)) |
17493 | 737 (((class color) |
738 (background light)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
739 (:foreground "indianred4" :italic t)) |
17493 | 740 (t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
741 (:italic t))) "Face used for displaying header content." |
17493 | 742 :group 'gnus-article-headers |
743 :group 'gnus-article-highlight) | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
744 ;; backward-compatibility alias |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
745 (put 'gnus-header-content-face 'face-alias 'gnus-header-content) |
17493 | 746 |
747 (defcustom gnus-header-face-alist | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
748 '(("From" nil gnus-header-from) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
749 ("Subject" nil gnus-header-subject) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
750 ("Newsgroups:.*," nil gnus-header-newsgroups) |
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
751 ("" gnus-header-name gnus-header-content)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
752 "*Controls highlighting of article headers. |
17493 | 753 |
754 An alist of the form (HEADER NAME CONTENT). | |
755 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
756 HEADER is a regular expression which should match the name of a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
757 header and NAME and CONTENT are either face names or nil. |
17493 | 758 |
759 The name of each header field will be displayed using the face | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
760 specified by the first element in the list where HEADER matches |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
761 the header name and NAME is non-nil. Similarly, the content will |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
762 be displayed by the first non-nil matching CONTENT face." |
17493 | 763 :group 'gnus-article-headers |
764 :group 'gnus-article-highlight | |
765 :type '(repeat (list (regexp :tag "Header") | |
766 (choice :tag "Name" | |
767 (item :tag "skip" nil) | |
768 (face :value default)) | |
769 (choice :tag "Content" | |
770 (item :tag "skip" nil) | |
771 (face :value default))))) | |
772 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
773 (defcustom gnus-article-decode-hook |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
774 '(article-decode-charset article-decode-encoded-words |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
775 article-decode-group-name article-decode-idna-rhs) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
776 "*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
|
777 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
778 :type 'hook) |
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-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
|
781 "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
|
782 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
783 :type 'function) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
784 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
785 (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
|
786 "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
|
787 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
788 (defvar gnus-article-dumbquotes-map |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
789 '(("\200" "EUR") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
790 ("\202" ",") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
791 ("\203" "f") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
792 ("\204" ",,") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
793 ("\205" "...") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
794 ("\213" "<") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
795 ("\214" "OE") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
796 ("\221" "`") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
797 ("\222" "'") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
798 ("\223" "``") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
799 ("\224" "\"") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
800 ("\225" "*") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
801 ("\226" "-") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
802 ("\227" "--") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
803 ("\230" "~") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
804 ("\231" "(TM)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
805 ("\233" ">") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
806 ("\234" "oe") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
807 ("\264" "'")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
808 "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
|
809 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
810 (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
|
811 "List of MIME types that should be ignored by Gnus." |
33397 | 812 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
813 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
814 :type '(repeat regexp)) |
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-unbuttonized-mime-types '(".*/.*") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
817 "List of MIME types that should not be given buttons when rendered inline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
818 See also `gnus-buttonized-mime-types' which may override this variable. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
819 This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
820 :version "21.1" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
821 :group 'gnus-article-mime |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
822 :type '(repeat regexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
823 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
824 (defcustom gnus-buttonized-mime-types nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
825 "List of MIME types that should be given buttons when rendered inline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
826 If set, this variable overrides `gnus-unbuttonized-mime-types'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
827 To see e.g. security buttons you could set this to |
67643
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
828 `(\"multipart/signed\")'. You could also add \"multipart/alternative\" to |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
829 this list to display radio buttons that allow you to choose one of two |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
830 media types those mails include. See also `mm-discouraged-alternatives'. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
831 This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
832 :version "22.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
833 :group 'gnus-article-mime |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
834 :type '(repeat regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
835 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
836 (defcustom gnus-inhibit-mime-unbuttonizing nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
837 "If non-nil, all MIME parts get buttons. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
838 When nil (the default value), then some MIME parts do not get buttons, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
839 as described by the variables `gnus-buttonized-mime-types' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
840 `gnus-unbuttonized-mime-types'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
841 :version "22.1" |
62755
0d1a48b1ca68
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324
Miles Bader <miles@gnu.org>
parents:
62428
diff
changeset
|
842 :group 'gnus-article-mime |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
843 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
844 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
845 (defcustom gnus-body-boundary-delimiter "_" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
846 "String used to delimit header and body. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
847 This variable is used by `gnus-article-treat-body-boundary' which can |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
848 be controlled by `gnus-treat-body-boundary'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
849 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
850 :group 'gnus-article-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
851 :type '(choice (item :tag "None" :value nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
852 string)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
853 |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
854 (defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
855 "/usr/share/picons") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
856 "Defines the location of the faces database. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
857 For information on obtaining this database of pretty pictures, please |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
858 see http://www.cs.indiana.edu/picons/ftp/index.html" |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
859 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
860 :type '(repeat directory) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
861 :link '(url-link :tag "download" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
862 "http://www.cs.indiana.edu/picons/ftp/index.html") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
863 :link '(custom-manual "(gnus)Picons") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
864 :group 'gnus-picon) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
865 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
866 (defun gnus-picons-installed-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
867 "Say whether picons are installed on your machine." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
868 (let ((installed nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
869 (dolist (database gnus-picon-databases) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
870 (when (file-exists-p database) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
871 (setq installed t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
872 installed)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
873 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
874 (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
|
875 "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
|
876 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
|
877 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
|
878 :group 'gnus-article-mime |
65342
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
65271
diff
changeset
|
879 :type '(choice (const nil) |
c71b1b2d2d04
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Miles Bader <miles@gnu.org>
parents:
65271
diff
changeset
|
880 function)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
881 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
882 (defcustom gnus-mime-multipart-functions nil |
33397 | 883 "An alist of MIME types to functions to display them." |
884 :version "21.1" | |
885 :group 'gnus-article-mime | |
886 :type 'alist) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
887 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
888 (defcustom gnus-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
|
889 "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
|
890 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
|
891 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
|
892 be added below it (otherwise)." |
33397 | 893 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
894 :group 'gnus-article-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
895 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
896 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
897 (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
|
898 "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
|
899 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
|
900 For `undisplayed-alternative' (default), the first undisplayed |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
901 part or alternative part is used. For `undisplayed', the first |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
902 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
|
903 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
|
904 used." |
33397 | 905 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
906 :group 'gnus-article-mime |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
907 :type '(choice |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
908 (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
|
909 (item :tag "undisplayed" :value undisplayed) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
910 (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
|
911 :value undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
912 (function))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
913 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
914 (defcustom gnus-mime-action-alist |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
915 '(("save to file" . gnus-mime-save-part) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
916 ("save and strip" . gnus-mime-save-part-and-strip) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
917 ("delete part" . gnus-mime-delete-part) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
918 ("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
|
919 ("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
|
920 ("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
|
921 ("toggle display" . gnus-article-press-button) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
922 ("toggle display" . gnus-article-view-part-as-charset) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
923 ("view as type" . gnus-mime-view-part-as-type) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
924 ("view internally" . gnus-mime-view-part-internally) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
925 ("view externally" . gnus-mime-view-part-externally)) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
926 "An alist of actions that run on the MIME attachment." |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
927 :group 'gnus-article-mime |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
928 :type '(repeat (cons (string :tag "name") |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
929 (function)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
930 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
931 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
932 ;;; The treatment variables |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
933 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
934 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
935 (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
|
936 "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
|
937 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
938 (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
|
939 '(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
|
940 (const :tag "On" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
941 (const :tag "Header" head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
942 (const :tag "Last" last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
943 (integer :tag "Less") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
944 (repeat :tag "Groups" regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
945 (sexp :tag "Predicate"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
946 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
947 (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
|
948 '(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
|
949 (const :tag "Header" head))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
950 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
951 (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
|
952 "Parts to treat.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
953 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
954 (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
|
955 "Whether to inhibit treatment.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
956 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
957 (defcustom gnus-treat-highlight-signature '(or t (typep "text/x-vcard")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
958 "Highlight the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
959 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
960 See Info node `(gnus)Customizing Articles'." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
961 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
962 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
963 :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
|
964 (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
|
965 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
966 (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
|
967 "Add buttons. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
968 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
969 See Info node `(gnus)Customizing Articles'." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
970 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
971 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
972 :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
|
973 (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
|
974 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
975 (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
|
976 "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
|
977 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
978 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
979 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
980 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
981 :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
|
982 (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
|
983 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
984 (defcustom gnus-treat-emphasize |
34818
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
985 (and (or window-system |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
986 (featurep 'xemacs) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
987 (>= (string-to-number emacs-version) 21)) |
2c66e24f2398
* gnus-art.el (article-treat-dumbquotes): Quote \.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34727
diff
changeset
|
988 50000) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
989 "Emphasize text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
990 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
991 See Info node `(gnus)Customizing Articles' for details." |
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 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
993 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
994 :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
|
995 (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
|
996 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
997 (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
|
998 "Remove carriage returns. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
999 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1000 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1001 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1002 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1003 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1004 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1005 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1006 (defcustom gnus-treat-unsplit-urls nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1007 "Remove newlines from within URLs. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1008 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1009 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1010 :version "22.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1011 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1012 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1013 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1014 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1015 (defcustom gnus-treat-leading-whitespace nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1016 "Remove leading whitespace in headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1017 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1018 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1019 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1020 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1021 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1022 :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
|
1023 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1024 (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
|
1025 "Hide headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1026 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1027 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1028 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1029 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1030 :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
|
1031 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1032 (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
|
1033 "Hide boring headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1034 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1035 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1036 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1037 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1038 :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
|
1039 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1040 (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
|
1041 "Hide the signature. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1042 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1043 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1044 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1045 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1046 :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
|
1047 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1048 (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
|
1049 "Fill the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1050 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1051 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1052 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1053 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1054 :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
|
1055 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1056 (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
|
1057 "Hide cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1058 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1059 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1060 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1061 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1062 :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
|
1063 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1064 (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
|
1065 "Hide cited text. |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1066 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1067 See Info node `(gnus)Customizing Articles' for details." |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1068 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1069 :link '(custom-manual "(gnus)Customizing Articles") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1070 :type gnus-article-treat-custom) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1071 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1072 (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
|
1073 "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
|
1074 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1075 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1076 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1077 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1078 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1079 :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
|
1080 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1081 (make-obsolete-variable 'gnus-treat-strip-pgp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1082 "This option is obsolete in Gnus 5.10.") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1083 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1084 (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
|
1085 "Strip PEM signatures. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1086 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1087 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1088 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1089 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1090 :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
|
1091 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1092 (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
|
1093 "Strip banners from articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1094 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
|
1095 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1096 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1097 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1098 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1099 :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
|
1100 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1101 (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
|
1102 "Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1103 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1104 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1105 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1106 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1107 :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
|
1108 (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
|
1109 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1110 (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
|
1111 "Highlight cited text. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1112 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1113 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1114 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1115 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1116 :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
|
1117 (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
|
1118 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1119 (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
|
1120 "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
|
1121 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1122 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1123 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1124 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1125 :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
|
1126 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1127 (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
|
1128 "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
|
1129 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1130 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1131 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1132 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1133 :type gnus-article-treat-head-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1134 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1135 (defcustom gnus-treat-date-english nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1136 "Display the Date in a format that can be read aloud in English. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1137 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1138 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1139 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1140 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1141 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1142 :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
|
1143 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1144 (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
|
1145 "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
|
1146 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1147 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1148 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1149 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1150 :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
|
1151 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1152 (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
|
1153 "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
|
1154 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1155 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1156 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1157 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1158 :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
|
1159 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1160 (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
|
1161 "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
|
1162 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1163 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1164 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1165 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1166 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1167 :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
|
1168 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1169 (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
|
1170 "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
|
1171 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
|
1172 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1173 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1174 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1175 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1176 :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
|
1177 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1178 (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
|
1179 "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
|
1180 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1181 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1182 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1183 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1184 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1185 :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
|
1186 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1187 (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
|
1188 "Strip trailing blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1189 Valid values are nil, t, `head', `last', an integer or a predicate. |
66299
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1190 See Info node `(gnus)Customizing Articles' for details. |
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1191 |
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1192 When set to t, it also strips trailing blanks in all MIME parts. |
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1193 Consider to use `last' instead." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1194 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1195 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1196 :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
|
1197 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1198 (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
|
1199 "Strip leading blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1200 Valid values are nil, t, `head', `last', an integer or a predicate. |
66299
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1201 See Info node `(gnus)Customizing Articles' for details. |
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1202 |
01b85ec4a61d
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615
Miles Bader <miles@gnu.org>
parents:
65719
diff
changeset
|
1203 When set to t, it also strips trailing blanks in all MIME parts." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1204 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1205 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1206 :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
|
1207 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1208 (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
|
1209 "Strip multiple blank lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1210 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1211 See Info node `(gnus)Customizing Articles' for details." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1212 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1213 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1214 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1215 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1216 (defcustom gnus-treat-unfold-headers 'head |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1217 "Unfold folded header lines. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1218 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1219 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1220 :version "22.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1221 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1222 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1223 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1224 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1225 (defcustom gnus-treat-fold-headers nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1226 "Fold headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1227 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1228 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1229 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1230 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1231 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1232 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1233 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1234 (defcustom gnus-treat-fold-newsgroups 'head |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1235 "Fold the Newsgroups and Followup-To headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1236 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1237 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1238 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1239 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1240 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1241 :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
|
1242 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1243 (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
|
1244 "Treat overstrike highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1245 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1246 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1247 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1248 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1249 :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
|
1250 (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
|
1251 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1252 (make-obsolete-variable 'gnus-treat-display-xface |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1253 'gnus-treat-display-x-face) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1254 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1255 (defcustom gnus-treat-display-x-face |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1256 (and (not noninteractive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1257 (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
|
1258 (image-type-available-p 'xbm) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1259 (string-match "^0x" (shell-command-to-string "uncompface")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1260 (executable-find "icontopbm")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1261 (and (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1262 (featurep 'xface))) |
31785 | 1263 'head) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1264 "Display X-Face headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1265 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1266 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1267 `(gnus)X-Face' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1268 :group 'gnus-article-treat |
35759 | 1269 :version "21.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1270 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1271 :link '(custom-manual "(gnus)X-Face") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1272 :type gnus-article-treat-head-custom |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1273 :set (lambda (symbol value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1274 (set-default |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1275 symbol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1276 (cond ((or (boundp symbol) (get symbol 'saved-value)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1277 value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1278 ((boundp 'gnus-treat-display-xface) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1279 (message "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1280 ** gnus-treat-display-xface is an obsolete variable;\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1281 use gnus-treat-display-x-face instead") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1282 (default-value 'gnus-treat-display-xface)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1283 ((get 'gnus-treat-display-xface 'saved-value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1284 (message "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1285 ** gnus-treat-display-xface is an obsolete variable;\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1286 use gnus-treat-display-x-face instead") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1287 (eval (car (get 'gnus-treat-display-xface 'saved-value)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1288 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1289 value))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1290 (put 'gnus-treat-display-x-face 'highlight t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1291 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1292 (defcustom gnus-treat-display-face |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1293 (and (not noninteractive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1294 (or (and (fboundp 'image-type-available-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1295 (image-type-available-p 'png)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1296 (and (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1297 (featurep 'png))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1298 'head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1299 "Display Face headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1300 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1301 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1302 `(gnus)X-Face' for details." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1303 :group 'gnus-article-treat |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1304 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1305 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1306 :link '(custom-manual "(gnus)X-Face") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1307 :type gnus-article-treat-head-custom) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1308 (put 'gnus-treat-display-face 'highlight t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1309 |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
1310 (defcustom gnus-treat-display-smileys |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1311 (if (or (and (featurep 'xemacs) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1312 (featurep 'xpm)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1313 (and (fboundp 'image-type-available-p) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1314 (image-type-available-p 'pbm))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
1315 t nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1316 "Display smileys. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1317 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1318 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1319 `(gnus)Smileys' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1320 :group 'gnus-article-treat |
35759 | 1321 :version "21.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1322 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1323 :link '(custom-manual "(gnus)Smileys") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1324 :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
|
1325 (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
|
1326 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1327 (defcustom gnus-treat-from-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1328 (if (and (gnus-image-type-available-p 'xpm) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1329 (gnus-picons-installed-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1330 'head nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1331 "Display picons in the From header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1332 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1333 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1334 `(gnus)Picons' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1335 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1336 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1337 :group 'gnus-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1338 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1339 :link '(custom-manual "(gnus)Picons") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1340 :type gnus-article-treat-head-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1341 (put 'gnus-treat-from-picon 'highlight t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1342 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1343 (defcustom gnus-treat-mail-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1344 (if (and (gnus-image-type-available-p 'xpm) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1345 (gnus-picons-installed-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1346 'head nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1347 "Display picons in To and Cc headers. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1348 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1349 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1350 `(gnus)Picons' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1351 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1352 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1353 :group 'gnus-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1354 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1355 :link '(custom-manual "(gnus)Picons") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1356 :type gnus-article-treat-head-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1357 (put 'gnus-treat-mail-picon 'highlight t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1358 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1359 (defcustom gnus-treat-newsgroups-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1360 (if (and (gnus-image-type-available-p 'xpm) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1361 (gnus-picons-installed-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1362 'head nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1363 "Display picons in the Newsgroups and Followup-To headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1364 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1365 See Info node `(gnus)Customizing Articles' and Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1366 `(gnus)Picons' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1367 :version "22.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1368 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1369 :group 'gnus-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1370 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1371 :link '(custom-manual "(gnus)Picons") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1372 :type gnus-article-treat-head-custom) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1373 (put 'gnus-treat-newsgroups-picon 'highlight t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1374 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1375 (defcustom gnus-treat-body-boundary |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1376 (if (or gnus-treat-newsgroups-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1377 gnus-treat-mail-picon |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1378 gnus-treat-from-picon) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1379 'head nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1380 "Draw a boundary at the end of the headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1381 Valid values are nil and `head'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1382 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1383 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1384 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1385 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1386 :type gnus-article-treat-head-custom) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1387 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1388 (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
|
1389 "Capitalize sentence-starting words. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1390 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1391 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1392 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1393 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1394 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1395 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1396 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1397 (defcustom gnus-treat-wash-html nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1398 "Format as HTML. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1399 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1400 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1401 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1402 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1403 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1404 :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
|
1405 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1406 (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
|
1407 "Fill long lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1408 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1409 See Info node `(gnus)Customizing Articles' for details." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1410 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1411 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1412 :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
|
1413 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1414 (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
|
1415 "Play sounds. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1416 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1417 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1418 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1419 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1420 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1421 :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
|
1422 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1423 (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
|
1424 "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
|
1425 Valid values are nil, t, `head', `last', an integer or a predicate. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1426 See Info node `(gnus)Customizing Articles' for details." |
33397 | 1427 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1428 :group 'gnus-article-treat |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1429 :link '(custom-manual "(gnus)Customizing Articles") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1430 :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
|
1431 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1432 (defcustom gnus-treat-x-pgp-sig nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1433 "Verify X-PGP-Sig. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1434 To automatically treat X-PGP-Sig, set it to head. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1435 Valid values are nil, t, `head', `last', an integer or a predicate. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1436 See Info node `(gnus)Customizing Articles' for details." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1437 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1438 :group 'gnus-article-treat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1439 :group 'mime-security |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1440 :link '(custom-manual "(gnus)Customizing Articles") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1441 :type gnus-article-treat-custom) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1442 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1443 (defvar gnus-article-encrypt-protocol-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1444 '(("PGP" . mml2015-self-encrypt))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1445 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1446 ;; Set to nil if more than one protocol added to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1447 ;; gnus-article-encrypt-protocol-alist. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1448 (defcustom gnus-article-encrypt-protocol "PGP" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1449 "The protocol used for encrypt articles. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1450 It is a string, such as \"PGP\". If nil, ask user." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1451 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1452 :type 'string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1453 :group 'mime-security) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1454 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1455 (defvar gnus-article-wash-function nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1456 "Function used for converting HTML into text.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1457 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1458 (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1459 (mm-coding-system-p 'utf-8) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1460 (executable-find idna-program)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1461 "Whether IDNA decoding of headers is used when viewing messages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1462 This requires GNU Libidn, and by default only enabled if it is found." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1463 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1464 :group 'gnus-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1465 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1466 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1467 (defcustom gnus-article-over-scroll nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1468 "If non-nil, allow scrolling the article buffer even when there no more text." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
1469 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1470 :group 'gnus-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1471 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1472 |
17493 | 1473 ;;; Internal variables |
1474 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1475 (defvar gnus-english-month-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1476 '("January" "February" "March" "April" "May" "June" "July" "August" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1477 "September" "October" "November" "December")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1478 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1479 (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
|
1480 (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
|
1481 (defvar gnus-article-emphasis-alist nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1482 (defvar gnus-article-image-alist nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1483 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1484 (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
|
1485 (defvar gnus-treatment-function-alist |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1486 '((gnus-treat-x-pgp-sig gnus-article-verify-x-pgp-sig) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1487 (gnus-treat-strip-banner gnus-article-strip-banner) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1488 (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
|
1489 (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
|
1490 (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
|
1491 (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
|
1492 (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
|
1493 (gnus-treat-strip-cr gnus-article-remove-cr) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1494 (gnus-treat-unsplit-urls gnus-article-unsplit-urls) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1495 (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
|
1496 (gnus-treat-date-local gnus-article-date-local) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1497 (gnus-treat-date-english gnus-article-date-english) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1498 (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
|
1499 (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
|
1500 (gnus-treat-date-iso8601 gnus-article-date-iso8601) |
65130
d2334ecd8eae
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-517
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1501 (gnus-treat-date-lapsed gnus-article-date-lapsed) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1502 (gnus-treat-display-x-face gnus-article-display-x-face) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1503 (gnus-treat-display-face gnus-article-display-face) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1504 (gnus-treat-hide-headers gnus-article-maybe-hide-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1505 (gnus-treat-hide-boring-headers gnus-article-hide-boring-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1506 (gnus-treat-hide-signature gnus-article-hide-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1507 (gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1508 (gnus-treat-leading-whitespace gnus-article-remove-leading-whitespace) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1509 (gnus-treat-strip-pem gnus-article-hide-pem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1510 (gnus-treat-from-picon gnus-treat-from-picon) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1511 (gnus-treat-mail-picon gnus-treat-mail-picon) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1512 (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1513 (gnus-treat-highlight-headers gnus-article-highlight-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1514 (gnus-treat-highlight-signature gnus-article-highlight-signature) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1515 (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
|
1516 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
|
1517 (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
|
1518 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
|
1519 (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
|
1520 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
|
1521 (gnus-treat-overstrike gnus-article-treat-overstrike) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1522 (gnus-treat-unfold-headers gnus-article-treat-unfold-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1523 (gnus-treat-fold-headers gnus-article-treat-fold-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1524 (gnus-treat-fold-newsgroups gnus-article-treat-fold-newsgroups) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1525 (gnus-treat-buttonize-head gnus-article-add-buttons-to-head) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1526 (gnus-treat-display-smileys gnus-treat-smiley) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1527 (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1528 (gnus-treat-wash-html gnus-article-wash-html) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1529 (gnus-treat-emphasize gnus-article-emphasize) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1530 (gnus-treat-hide-citation gnus-article-hide-citation) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1531 (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1532 (gnus-treat-highlight-citation gnus-article-highlight-citation) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1533 (gnus-treat-body-boundary gnus-article-treat-body-boundary) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1534 (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
|
1535 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1536 (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
|
1537 (defvar article-lapsed-timer nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1538 (defvar gnus-article-current-summary nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1539 |
17493 | 1540 (defvar gnus-article-mode-syntax-table |
1541 (let ((table (copy-syntax-table text-mode-syntax-table))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1542 ;; This causes the citation match run O(2^n). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1543 ;; (modify-syntax-entry ?- "w" table) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1544 (modify-syntax-entry ?> ")<" table) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1545 (modify-syntax-entry ?< "(>" table) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1546 ;; make M-. in article buffers work for `foo' strings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1547 (modify-syntax-entry ?' " " table) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1548 (modify-syntax-entry ?` " " table) |
17493 | 1549 table) |
1550 "Syntax table used in article mode buffers. | |
1551 Initialized from `text-mode-syntax-table.") | |
1552 | |
1553 (defvar gnus-save-article-buffer nil) | |
1554 | |
1555 (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
|
1556 (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
|
1557 (?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
|
1558 gnus-summary-mode-line-format-alist)) |
17493 | 1559 |
1560 (defvar gnus-number-of-articles-to-be-saved nil) | |
1561 | |
1562 (defvar gnus-inhibit-hiding nil) | |
1563 | |
57265
cee5a9d8ee71
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-580
Miles Bader <miles@gnu.org>
parents:
57153
diff
changeset
|
1564 (defvar gnus-article-edit-mode nil) |
cee5a9d8ee71
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-580
Miles Bader <miles@gnu.org>
parents:
57153
diff
changeset
|
1565 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1566 ;;; Macros for dealing with the article buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1567 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1568 (defmacro gnus-with-article-headers (&rest forms) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1569 `(save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1570 (set-buffer gnus-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1571 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1572 (let ((inhibit-read-only t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1573 (inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1574 (case-fold-search t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1575 (article-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1576 ,@forms)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1577 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1578 (put 'gnus-with-article-headers 'lisp-indent-function 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1579 (put 'gnus-with-article-headers 'edebug-form-spec '(body)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1580 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1581 (defmacro gnus-with-article-buffer (&rest forms) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1582 `(save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1583 (set-buffer gnus-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1584 (let ((inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1585 ,@forms))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1586 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1587 (put 'gnus-with-article-buffer 'lisp-indent-function 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1588 (put 'gnus-with-article-buffer 'edebug-form-spec '(body)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1589 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1590 (defun gnus-article-goto-header (header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1591 "Go to HEADER, which is a regular expression." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1592 (re-search-forward (concat "^\\(" header "\\):") nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1593 |
17493 | 1594 (defsubst gnus-article-hide-text (b e props) |
1595 "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
|
1596 (gnus-add-text-properties-when 'article-type nil b e props) |
17493 | 1597 (when (memq 'intangible props) |
1598 (put-text-property | |
1599 (max (1- b) (point-min)) | |
1600 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
|
1601 |
17493 | 1602 (defsubst gnus-article-unhide-text (b e) |
1603 "Remove hidden text properties from region between B and E." | |
1604 (remove-text-properties b e gnus-hidden-properties) | |
1605 (when (memq 'intangible gnus-hidden-properties) | |
1606 (put-text-property (max (1- b) (point-min)) | |
1607 b 'intangible nil))) | |
1608 | |
1609 (defun gnus-article-hide-text-type (b e type) | |
1610 "Hide text of TYPE between B and E." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1611 (gnus-add-wash-type type) |
17493 | 1612 (gnus-article-hide-text |
1613 b e (cons 'article-type (cons type gnus-hidden-properties)))) | |
1614 | |
1615 (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
|
1616 "Unhide text of TYPE between B and E." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1617 (gnus-delete-wash-type type) |
17493 | 1618 (remove-text-properties |
1619 b e (cons 'article-type (cons type gnus-hidden-properties))) | |
1620 (when (memq 'intangible gnus-hidden-properties) | |
1621 (put-text-property (max (1- b) (point-min)) | |
1622 b 'intangible nil))) | |
1623 | |
1624 (defun gnus-article-hide-text-of-type (type) | |
1625 "Hide text of TYPE in the current buffer." | |
1626 (save-excursion | |
1627 (let ((b (point-min)) | |
1628 (e (point-max))) | |
1629 (while (setq b (text-property-any b e 'article-type type)) | |
1630 (add-text-properties b (incf b) gnus-hidden-properties))))) | |
1631 | |
1632 (defun gnus-article-delete-text-of-type (type) | |
1633 "Delete text of TYPE in the current buffer." | |
1634 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1635 (let ((b (point-min))) |
68129
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1636 (if (eq type 'multipart) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1637 ;; Remove MIME buttons associated with multipart/alternative parts. |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1638 (progn |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1639 (goto-char b) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1640 (while (if (get-text-property (point) 'gnus-part) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1641 (setq b (point)) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1642 (when (setq b (next-single-property-change (point) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1643 'gnus-part)) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1644 (goto-char b) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1645 t)) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1646 (end-of-line) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1647 (skip-chars-forward "\n") |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1648 (when (eq (get-text-property b 'article-type) 'multipart) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1649 (delete-region b (point))))) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1650 (while (setq b (text-property-any b (point-max) 'article-type type)) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1651 (delete-region |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1652 b (or (text-property-not-all b (point-max) 'article-type type) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
1653 (point-max)))))))) |
17493 | 1654 |
1655 (defun gnus-article-delete-invisible-text () | |
1656 "Delete all invisible text in the current buffer." | |
1657 (save-excursion | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1658 (let ((b (point-min))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1659 (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
|
1660 (delete-region |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
1661 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
|
1662 (point-max))))))) |
17493 | 1663 |
1664 (defun gnus-article-text-type-exists-p (type) | |
1665 "Say whether any text of type TYPE exists in the buffer." | |
1666 (text-property-any (point-min) (point-max) 'article-type type)) | |
1667 | |
1668 (defsubst gnus-article-header-rank () | |
1669 "Give the rank of the string HEADER as given by `gnus-sorted-header-list'." | |
1670 (let ((list gnus-sorted-header-list) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1671 (i 1)) |
17493 | 1672 (while list |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1673 (if (looking-at (car list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1674 (setq list nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1675 (setq list (cdr list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1676 (incf i))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1677 i)) |
17493 | 1678 |
1679 (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
|
1680 "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
|
1681 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1682 ;; 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
|
1683 (unless gnus-inhibit-hiding |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1684 (let ((inhibit-read-only nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1685 (case-fold-search t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1686 (max (1+ (length gnus-sorted-header-list))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1687 (inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1688 (cur (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1689 ignored visible beg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1690 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1691 ;; `gnus-ignored-headers' and `gnus-visible-headers' may be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1692 ;; group parameters, so we should go to the summary buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1693 (when (prog1 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1694 (condition-case nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1695 (progn (set-buffer gnus-summary-buffer) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1696 (error nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1697 (setq ignored (when (not gnus-visible-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1698 (cond ((stringp gnus-ignored-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1699 gnus-ignored-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1700 ((listp gnus-ignored-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1701 (mapconcat 'identity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1702 gnus-ignored-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1703 "\\|")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1704 visible (cond ((stringp gnus-visible-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1705 gnus-visible-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1706 ((and gnus-visible-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1707 (listp gnus-visible-headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1708 (mapconcat 'identity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1709 gnus-visible-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1710 "\\|"))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1711 (set-buffer cur)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1712 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1713 ;; 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
|
1714 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1715 ;; 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
|
1716 (while (looking-at "From ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1717 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1718 (unless (bobp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1719 (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
|
1720 ;; 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
|
1721 ;; 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
|
1722 ;; `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
|
1723 ;; 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
|
1724 ;; article buffer. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1725 (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
|
1726 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1727 ;; 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
|
1728 (put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1729 (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
|
1730 (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
|
1731 (and ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1732 (not (looking-at ignored)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1733 (gnus-article-header-rank) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1734 (+ 2 max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1735 (forward-line 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1736 (message-sort-headers-1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1737 (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
|
1738 (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
|
1739 ;; We delete the unwanted headers. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1740 (gnus-add-wash-type 'headers) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1741 (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
|
1742 '(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
|
1743 (delete-region beg (point-max)))))))) |
17493 | 1744 |
1745 (defun article-hide-boring-headers (&optional arg) | |
1746 "Toggle hiding of headers that aren't very interesting. | |
1747 If given a negative prefix, always show; if given a positive prefix, | |
1748 always hide." | |
1749 (interactive (gnus-article-hidden-arg)) | |
1750 (when (and (not (gnus-article-check-hidden-text 'boring-headers arg)) | |
1751 (not gnus-show-all-headers)) | |
1752 (save-excursion | |
1753 (save-restriction | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1754 (let ((inhibit-read-only t) |
17493 | 1755 (list gnus-boring-article-headers) |
1756 (inhibit-point-motion-hooks t) | |
1757 elem) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1758 (article-narrow-to-head) |
17493 | 1759 (while list |
1760 (setq elem (pop list)) | |
1761 (goto-char (point-min)) | |
1762 (cond | |
1763 ;; Hide empty headers. | |
1764 ((eq elem 'empty) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1765 (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) |
17493 | 1766 (forward-line -1) |
1767 (gnus-article-hide-text-type | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1768 (gnus-point-at-bol) |
17493 | 1769 (progn |
1770 (end-of-line) | |
1771 (if (re-search-forward "^[^ \t]" nil t) | |
1772 (match-beginning 0) | |
1773 (point-max))) | |
1774 'boring-headers))) | |
1775 ;; Hide boring Newsgroups header. | |
1776 ((eq elem 'newsgroups) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1777 (when (gnus-string-equal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1778 (gnus-fetch-field "newsgroups") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1779 (gnus-group-real-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1780 (if (boundp 'gnus-newsgroup-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1781 gnus-newsgroup-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1782 ""))) |
17493 | 1783 (gnus-article-hide-header "newsgroups"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1784 ((eq elem 'to-address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1785 (let ((to (message-fetch-field "to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1786 (to-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1787 (gnus-parameter-to-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1788 (if (boundp 'gnus-newsgroup-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1789 gnus-newsgroup-name "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1790 (when (and to to-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1791 (ignore-errors |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1792 (gnus-string-equal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1793 ;; only one address in To |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1794 (nth 1 (mail-extract-address-components to)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1795 to-address))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1796 (gnus-article-hide-header "to")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1797 ((eq elem 'to-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1798 (let ((to (message-fetch-field "to")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1799 (to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1800 (gnus-parameter-to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1801 (if (boundp 'gnus-newsgroup-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1802 gnus-newsgroup-name "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1803 (when (and to to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1804 (ignore-errors |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1805 (gnus-string-equal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1806 ;; only one address in To |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1807 (nth 1 (mail-extract-address-components to)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1808 to-list))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1809 (gnus-article-hide-header "to")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1810 ((eq elem 'cc-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1811 (let ((cc (message-fetch-field "cc")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1812 (to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1813 (gnus-parameter-to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1814 (if (boundp 'gnus-newsgroup-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1815 gnus-newsgroup-name "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1816 (when (and cc to-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1817 (ignore-errors |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1818 (gnus-string-equal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1819 ;; only one address in CC |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1820 (nth 1 (mail-extract-address-components cc)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1821 to-list))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1822 (gnus-article-hide-header "cc")))) |
17493 | 1823 ((eq elem 'followup-to) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1824 (when (gnus-string-equal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1825 (message-fetch-field "followup-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1826 (message-fetch-field "newsgroups")) |
17493 | 1827 (gnus-article-hide-header "followup-to"))) |
1828 ((eq elem 'reply-to) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1829 (if (gnus-group-find-parameter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1830 gnus-newsgroup-name 'broken-reply-to) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1831 (gnus-article-hide-header "reply-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1832 (let ((from (message-fetch-field "from")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1833 (reply-to (message-fetch-field "reply-to"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1834 (when |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1835 (and |
17493 | 1836 from reply-to |
1837 (ignore-errors | |
1838 (equal | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1839 (sort (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1840 (lambda (x) (downcase (cadr x))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1841 (mail-extract-address-components from t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1842 'string<) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1843 (sort (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1844 (lambda (x) (downcase (cadr x))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1845 (mail-extract-address-components reply-to t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1846 'string<)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1847 (gnus-article-hide-header "reply-to"))))) |
17493 | 1848 ((eq elem 'date) |
1849 (let ((date (message-fetch-field "date"))) | |
1850 (when (and date | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1851 (< (days-between (current-time-string) date) |
17493 | 1852 4)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1853 (gnus-article-hide-header "date")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1854 ((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
|
1855 (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
|
1856 (cc (message-fetch-field "cc"))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1857 (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
|
1858 (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
|
1859 (when (> (length cc) 1024) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1860 (gnus-article-hide-header "cc")))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1861 ((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
|
1862 (let ((to-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1863 (cc-count 0)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1864 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1865 (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
|
1866 (setq to-count (1+ to-count))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1867 (when (> to-count 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1868 (while (> to-count 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1869 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1870 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1871 (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
|
1872 (forward-line -1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1873 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1874 (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
|
1875 (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
|
1876 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1877 (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
|
1878 (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
|
1879 (when (> cc-count 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1880 (while (> cc-count 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1881 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1882 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1883 (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
|
1884 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1885 (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
|
1886 (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
|
1887 (setq cc-count (1- cc-count))))))))))))) |
17493 | 1888 |
1889 (defun gnus-article-hide-header (header) | |
1890 (save-excursion | |
1891 (goto-char (point-min)) | |
1892 (when (re-search-forward (concat "^" header ":") nil t) | |
1893 (gnus-article-hide-text-type | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1894 (gnus-point-at-bol) |
17493 | 1895 (progn |
1896 (end-of-line) | |
1897 (if (re-search-forward "^[^ \t]" nil t) | |
1898 (match-beginning 0) | |
1899 (point-max))) | |
1900 'boring-headers)))) | |
1901 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1902 (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
|
1903 "Length of normalized headers.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1904 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1905 (defun article-normalize-headers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1906 "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
|
1907 (interactive) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1908 (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
|
1909 column) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1910 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1911 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1912 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1913 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1914 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1915 ((< (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
|
1916 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
|
1917 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1918 (insert (make-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1919 (- 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
|
1920 ? ))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1921 ((> 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
|
1922 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1923 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1924 (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
|
1925 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1926 (gnus-point-at-eol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1927 'invisible t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1928 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1929 ;; Do nothing. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1930 )) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1931 (forward-line 1)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1932 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1933 (defun article-treat-dumbquotes () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1934 "Translate M****s*** sm*rtq**t*s and other symbols into proper text. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1935 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
|
1936 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
|
1937 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1938 Sm*rtq**t*s are M****s***'s unilateral extension to the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1939 iso-8859-1 character map in an attempt to provide more quoting |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1940 characters. If you see something like \\222 or \\264 where |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1941 you're expecting some kind of apostrophe or quotation mark, then |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
1942 try this wash." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1943 (interactive) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1944 (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
|
1945 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1946 (defun article-translate-characters (from to) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1947 "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
|
1948 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
|
1949 characters to translate to." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1950 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1951 (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
|
1952 (let ((inhibit-read-only t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1953 (x (make-string 225 ?x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1954 (i -1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1955 (while (< (incf i) (length x)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1956 (aset x i i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1957 (setq i 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1958 (while (< i (length from)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1959 (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
|
1960 (incf i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1961 (translate-region (point) (point-max) x))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
1962 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1963 (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
|
1964 "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
|
1965 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
|
1966 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1967 (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
|
1968 (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
|
1969 elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1970 (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
|
1971 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1972 (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
|
1973 (replace-match (cadr elem))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1974 |
17493 | 1975 (defun article-treat-overstrike () |
1976 "Translate overstrikes into bold text." | |
1977 (interactive) | |
1978 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
1979 (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
|
1980 (let ((inhibit-read-only t)) |
17493 | 1981 (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
|
1982 (let ((next (char-after)) |
17493 | 1983 (previous (char-after (- (point) 2)))) |
1984 ;; We do the boldification/underlining by hiding the | |
1985 ;; overstrikes and putting the proper text property | |
1986 ;; on the letters. | |
1987 (cond | |
1988 ((eq next previous) | |
1989 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1990 (put-text-property (point) (1+ (point)) 'face 'bold)) | |
1991 ((eq next ?_) | |
1992 (gnus-article-hide-text-type | |
1993 (1- (point)) (1+ (point)) 'overstrike) | |
1994 (put-text-property | |
1995 (- (point) 2) (1- (point)) 'face 'underline)) | |
1996 ((eq previous ?_) | |
1997 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) | |
1998 (put-text-property | |
1999 (point) (1+ (point)) 'face 'underline))))))))) | |
2000 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2001 (defun gnus-article-treat-unfold-headers () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2002 "Unfold folded message headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2003 Only the headers that fit into the current window width will be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2004 unfolded." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2005 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2006 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2007 (let (length) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2008 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2009 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2010 (mail-header-narrow-to-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2011 (let ((header (buffer-string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2012 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2013 (insert header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2014 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2015 (while (re-search-forward "\n[\t ]" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2016 (replace-match " " t t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2017 (setq length (- (point-max) (point-min) 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2018 (when (< length (window-width)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2019 (while (re-search-forward "\n[\t ]" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2020 (replace-match " " t t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2021 (goto-char (point-max))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2022 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2023 (defun gnus-article-treat-fold-headers () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2024 "Fold message headers." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2025 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2026 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2027 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2028 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2029 (mail-header-narrow-to-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2030 (mail-header-fold-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2031 (goto-char (point-max)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2032 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2033 (defun gnus-treat-smiley () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2034 "Toggle display of textual emoticons (\"smileys\") as small graphical icons." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2035 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2036 (gnus-with-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2037 (if (memq 'smiley gnus-article-wash-types) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2038 (gnus-delete-images 'smiley) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2039 (article-goto-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2040 (let ((images (smiley-region (point) (point-max)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2041 (when images |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2042 (gnus-add-wash-type 'smiley) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2043 (dolist (image images) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2044 (gnus-add-image 'smiley image))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2045 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2046 (defun gnus-article-remove-images () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2047 "Remove all images from the article buffer." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2048 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2049 (gnus-with-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2050 (dolist (elem gnus-article-image-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2051 (gnus-delete-images (car elem))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2052 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2053 (defun gnus-article-treat-fold-newsgroups () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2054 "Unfold folded message headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2055 Only the headers that fit into the current window width will be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2056 unfolded." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2057 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2058 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2059 (while (gnus-article-goto-header "newsgroups\\|followup-to") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2060 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2061 (mail-header-narrow-to-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2062 (while (re-search-forward ", *" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2063 (replace-match ", " t t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2064 (mail-header-fold-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2065 (goto-char (point-max)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2066 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2067 (defun gnus-article-treat-body-boundary () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2068 "Place a boundary line at the end of the headers." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2069 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2070 (when (and gnus-body-boundary-delimiter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2071 (> (length gnus-body-boundary-delimiter) 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2072 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2073 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2074 (let ((start (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2075 (insert "X-Boundary: ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2076 (gnus-add-text-properties start (point) '(invisible t intangible t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2077 (insert (let (str) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2078 (while (>= (1- (window-width)) (length str)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2079 (setq str (concat str gnus-body-boundary-delimiter))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2080 (substring str 0 (1- (window-width)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2081 "\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2082 (gnus-put-text-property start (point) 'gnus-decoration 'header))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2083 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2084 (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
|
2085 "Fill lines that are wider than the window width." |
17493 | 2086 (interactive) |
2087 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2088 (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
|
2089 (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
|
2090 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2091 (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
|
2092 (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
|
2093 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2094 (end-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2095 (when (>= (current-column) (min fill-column width)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2096 (narrow-to-region (min (1+ (point)) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2097 (gnus-point-at-bol)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2098 (let ((goback (point-marker))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2099 (fill-paragraph nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2100 (goto-char (marker-position goback))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2101 (widen)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2102 (forward-line 1))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2103 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2104 (defun article-capitalize-sentences () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2105 "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
|
2106 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2107 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2108 (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
|
2109 (paragraph-start "^[\n\^L]")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2110 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2111 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2112 (capitalize-word 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2113 (forward-sentence))))) |
17493 | 2114 |
2115 (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
|
2116 "Remove trailing CRs and then translate remaining CRs into LFs." |
17493 | 2117 (interactive) |
2118 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2119 (let ((inhibit-read-only t)) |
17493 | 2120 (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
|
2121 (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
|
2122 (replace-match "" t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2123 (goto-char (point-min)) |
17493 | 2124 (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
|
2125 (replace-match "\n" t t))))) |
17493 | 2126 |
2127 (defun article-remove-trailing-blank-lines () | |
2128 "Remove all trailing blank lines from the article." | |
2129 (interactive) | |
2130 (save-excursion | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2131 (let ((inhibit-read-only t)) |
17493 | 2132 (goto-char (point-max)) |
2133 (delete-region | |
2134 (point) | |
2135 (progn | |
2136 (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
|
2137 (looking-at "^[ \t]*$") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2138 (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
|
2139 (point) (gnus-point-at-eol)))) |
17493 | 2140 (forward-line -1)) |
2141 (forward-line 1) | |
2142 (point)))))) | |
2143 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2144 (defun article-display-face () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2145 "Display any Face headers in the header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2146 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2147 (let ((wash-face-p buffer-read-only)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2148 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2149 ;; When displaying parts, this function can be called several times on |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2150 ;; the same article, without any intended toggle semantic (as typing `W |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2151 ;; D d' would have). So face deletion must occur only when we come from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2152 ;; an interactive command, that is when the *Article* buffer is |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2153 ;; read-only. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2154 (if (and wash-face-p (memq 'face gnus-article-wash-types)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2155 (gnus-delete-images 'face) |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2156 (let (face faces from) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2157 (save-current-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2158 (when (and wash-face-p |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2159 (gnus-buffer-live-p gnus-original-article-buffer) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2160 (not (re-search-forward "^Face:[\t ]*" nil t))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2161 (set-buffer gnus-original-article-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2162 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2163 (mail-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2164 (while (gnus-article-goto-header "Face") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2165 (push (mail-header-field-value) faces)))) |
63873
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2166 (when faces |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2167 (goto-char (point-min)) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2168 (let ((from (gnus-article-goto-header "from")) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2169 png image) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2170 (unless from |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2171 (insert "From:") |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2172 (setq from (point)) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2173 (insert "[no `from' set]\n")) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2174 (while faces |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2175 (when (setq png (gnus-convert-face-to-png (pop faces))) |
63873
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2176 (setq image (gnus-create-image png 'png t)) |
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2177 (goto-char from) |
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2178 (gnus-add-wash-type 'face) |
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2179 (gnus-add-image 'face image) |
cf8b4d09b958
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-461
Miles Bader <miles@gnu.org>
parents:
63738
diff
changeset
|
2180 (gnus-put-image image nil 'face)))))))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2181 |
17493 | 2182 (defun article-display-x-face (&optional force) |
2183 "Look for an X-Face header and display it if present." | |
2184 (interactive (list 'force)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2185 (let ((wash-face-p buffer-read-only)) ;; When type `W f' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2186 (gnus-with-article-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2187 ;; Delete the old process, if any. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2188 (when (process-status "article-x-face") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2189 (delete-process "article-x-face")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2190 ;; See the comment in `article-display-face'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2191 (if (and wash-face-p (memq 'xface gnus-article-wash-types)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2192 ;; We have already displayed X-Faces, so we remove them |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2193 ;; instead. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2194 (gnus-delete-images 'xface) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2195 ;; Display X-Faces. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2196 (let (x-faces from face) |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2197 (save-current-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2198 (when (and wash-face-p |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2199 (gnus-buffer-live-p gnus-original-article-buffer) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2200 (not (re-search-forward "^X-Face:[\t ]*" nil t))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2201 ;; If type `W f', use gnus-original-article-buffer, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2202 ;; otherwise use the current buffer because displaying |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2203 ;; RFC822 parts calls this function too. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2204 (set-buffer gnus-original-article-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2205 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2206 (mail-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2207 (while (gnus-article-goto-header "X-Face") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2208 (push (mail-header-field-value) x-faces)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2209 (setq from (message-fetch-field "from")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2210 ;; Sending multiple EOFs to xv doesn't work, so we only do a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2211 ;; single external face. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2212 (when (stringp gnus-article-x-face-command) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2213 (setq x-faces (list (car x-faces)))) |
63906
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2214 (when (and x-faces |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2215 gnus-article-x-face-command |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2216 (or force |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2217 ;; Check whether this face is censored. |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2218 (not gnus-article-x-face-too-ugly) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2219 (and from |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2220 (not (string-match gnus-article-x-face-too-ugly |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2221 from))))) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2222 (while (setq face (pop x-faces)) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2223 ;; We display the face. |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2224 (cond ((stringp gnus-article-x-face-command) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2225 ;; The command is a string, so we interpret the command |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2226 ;; as a, well, command, and fork it off. |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2227 (let ((process-connection-type nil)) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2228 (gnus-set-process-query-on-exit-flag |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2229 (start-process |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2230 "article-x-face" nil shell-file-name |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2231 shell-command-switch gnus-article-x-face-command) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2232 nil) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2233 (with-temp-buffer |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2234 (insert face) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2235 (process-send-region "article-x-face" |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2236 (point-min) (point-max))) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2237 (process-send-eof "article-x-face"))) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2238 ((functionp gnus-article-x-face-command) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2239 ;; The command is a lisp function, so we call it. |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2240 (funcall gnus-article-x-face-command face)) |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2241 (t |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2242 (error "%s is not a function" |
6e92df884ee6
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-464
Miles Bader <miles@gnu.org>
parents:
63873
diff
changeset
|
2243 gnus-article-x-face-command)))))))))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
2244 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2245 (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
|
2246 "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
|
2247 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2248 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2249 (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
|
2250 (let ((inhibit-point-motion-hooks t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2251 (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
|
2252 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2253 (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
|
2254 (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
|
2255 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2256 (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
|
2257 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2258 (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
|
2259 "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
|
2260 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
|
2261 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2262 (let ((inhibit-point-motion-hooks t) (case-fold-search t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2263 (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
|
2264 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2265 (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
|
2266 (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
|
2267 (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
|
2268 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2269 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2270 ct cte ctl charset format) |
68720
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2271 (save-excursion |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2272 (save-restriction |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2273 (article-narrow-to-head) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2274 (setq ct (message-fetch-field "Content-Type" t) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2275 cte (message-fetch-field "Content-Transfer-Encoding" t) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2276 ctl (and ct (mail-header-parse-content-type ct)) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2277 charset (cond |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2278 (prompt |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2279 (mm-read-coding-system "Charset to decode: ")) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2280 (ctl |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2281 (mail-content-type-get ctl 'charset))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2282 format (and ctl (mail-content-type-get ctl 'format))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2283 (when cte |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2284 (setq cte (mail-header-strip cte))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2285 (if (and ctl (not (string-match "/" (car ctl)))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2286 (setq ctl nil)) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2287 (goto-char (point-max))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2288 (forward-line 1) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2289 (save-restriction |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2290 (narrow-to-region (point) (point-max)) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2291 (when (and (eq mail-parse-charset 'gnus-decoded) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2292 (eq (mm-body-7-or-8) '8bit)) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2293 ;; The text code could have been decoded. |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2294 (setq charset mail-parse-charset)) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2295 (when (and (or (not ctl) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2296 (equal (car ctl) "text/plain")) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2297 (not format)) ;; article with format will decode later. |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2298 (mm-decode-body |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2299 charset (and cte (intern (downcase |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2300 (gnus-strip-whitespace cte)))) |
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2301 (car ctl))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2302 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2303 (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
|
2304 "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
|
2305 (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
|
2306 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2307 (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
|
2308 (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
|
2309 (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
|
2310 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2311 gnus-newsgroup-ignored-charsets)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2312 (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
|
2313 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2314 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2315 (funcall gnus-decode-header-function (point-min) (point-max))))) |
17493 | 2316 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2317 (defun article-decode-group-name () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2318 "Decode group names in `Newsgroups:'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2319 (let ((inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2320 (inhibit-read-only t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2321 (method (gnus-find-method-for-group gnus-newsgroup-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2322 (when (and (or gnus-group-name-charset-method-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2323 gnus-group-name-charset-group-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2324 (gnus-buffer-live-p gnus-original-article-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2325 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2326 (article-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2327 (with-current-buffer gnus-original-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2328 (goto-char (point-min))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2329 (while (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2330 "^Newsgroups:\\(\\(.\\|\n[\t ]\\)*\\)\n[^\t ]" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2331 (replace-match (save-match-data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2332 (gnus-decode-newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2333 ;; XXX how to use data in article buffer? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2334 (with-current-buffer gnus-original-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2335 (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2336 "^Newsgroups:\\(\\(.\\|\n[\t ]\\)*\\)\n[^\t ]" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2337 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2338 (match-string 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2339 gnus-newsgroup-name method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2340 t t nil 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2341 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2342 (with-current-buffer gnus-original-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2343 (goto-char (point-min))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2344 (while (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2345 "^Followup-To:\\(\\(.\\|\n[\t ]\\)*\\)\n[^\t ]" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2346 (replace-match (save-match-data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2347 (gnus-decode-newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2348 ;; XXX how to use data in article buffer? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2349 (with-current-buffer gnus-original-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2350 (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2351 "^Followup-To:\\(\\(.\\|\n[\t ]\\)*\\)\n[^\t ]" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2352 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2353 (match-string 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2354 gnus-newsgroup-name method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2355 t t nil 1)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2356 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2357 (autoload 'idna-to-unicode "idna") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2358 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2359 (defun article-decode-idna-rhs () |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
2360 "Decode IDNA strings in RHS in various headers in current buffer. |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
2361 The following headers are decoded: From:, To:, Cc:, Reply-To:, |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
2362 Mail-Reply-To: and Mail-Followup-To:." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2363 (when gnus-use-idna |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2364 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2365 (let ((inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2366 (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2367 (article-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2368 (goto-char (point-min)) |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
2369 (while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2370 (let (ace unicode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2371 (when (save-match-data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2372 (and (setq ace (match-string 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2373 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2374 (and (re-search-backward "^[^ \t]" nil t) |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
2375 (looking-at "From\\|To\\|Cc\\|Reply-To\\|Mail-Reply-To\\|Mail-Followup-To"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2376 (setq unicode (idna-to-unicode ace)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2377 (unless (string= ace unicode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2378 (replace-match unicode nil nil nil 1))))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2379 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2380 (defun article-de-quoted-unreadable (&optional force read-charset) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2381 "Translate a quoted-printable-encoded article. |
17493 | 2382 If FORCE, decode the article whether it is marked as quoted-printable |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2383 or not. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2384 If READ-CHARSET, ask for a coding system." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2385 (interactive (list 'force current-prefix-arg)) |
17493 | 2386 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2387 (let ((inhibit-read-only t) type charset) |
31785 | 2388 (if (gnus-buffer-live-p gnus-original-article-buffer) |
2389 (with-current-buffer gnus-original-article-buffer | |
2390 (setq type | |
2391 (gnus-fetch-field "content-transfer-encoding")) | |
2392 (let* ((ct (gnus-fetch-field "content-type")) | |
68720
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2393 (ctl (and ct (mail-header-parse-content-type ct)))) |
31785 | 2394 (setq charset (and ctl |
2395 (mail-content-type-get ctl 'charset))) | |
2396 (if (stringp charset) | |
2397 (setq charset (intern (downcase charset))))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2398 (if read-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2399 (setq charset (mm-read-coding-system "Charset: " charset))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2400 (unless charset |
31785 | 2401 (setq charset gnus-newsgroup-charset)) |
17493 | 2402 (when (or force |
32210 | 2403 (and type (let ((case-fold-search t)) |
2404 (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
|
2405 (article-goto-body) |
32210 | 2406 (quoted-printable-decode-region |
2407 (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
|
2408 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2409 (defun article-de-base64-unreadable (&optional force read-charset) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2410 "Translate a base64 article. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2411 If FORCE, decode the article whether it is marked as base64 not. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2412 If READ-CHARSET, ask for a coding system." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2413 (interactive (list 'force current-prefix-arg)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2414 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2415 (let ((inhibit-read-only t) type charset) |
31785 | 2416 (if (gnus-buffer-live-p gnus-original-article-buffer) |
2417 (with-current-buffer gnus-original-article-buffer | |
2418 (setq type | |
2419 (gnus-fetch-field "content-transfer-encoding")) | |
2420 (let* ((ct (gnus-fetch-field "content-type")) | |
68720
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2421 (ctl (and ct (mail-header-parse-content-type ct)))) |
31785 | 2422 (setq charset (and ctl |
2423 (mail-content-type-get ctl 'charset))) | |
2424 (if (stringp charset) | |
2425 (setq charset (intern (downcase charset))))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2426 (if read-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2427 (setq charset (mm-read-coding-system "Charset: " charset))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2428 (unless charset |
31785 | 2429 (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
|
2430 (when (or force |
32210 | 2431 (and type (let ((case-fold-search t)) |
2432 (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
|
2433 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2434 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2435 (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
|
2436 (base64-decode-region (point-min) (point-max)) |
32210 | 2437 (mm-decode-coding-region |
2438 (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
|
2439 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2440 (eval-when-compile |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2441 (require 'rfc1843)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2442 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2443 (defun article-decode-HZ () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2444 "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
|
2445 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2446 (require 'rfc1843) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2447 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2448 (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
|
2449 (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
|
2450 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2451 (defun article-unsplit-urls () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2452 "Remove the newlines that some other mailers insert into URLs." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2453 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2454 (save-excursion |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2455 (let ((inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2456 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2457 (while (re-search-forward |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
2458 "\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2459 (replace-match "\\1\\3" t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2460 (when (interactive-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2461 (gnus-treat-article nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2462 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2463 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2464 (defun article-wash-html (&optional read-charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2465 "Format an HTML article. |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2466 If READ-CHARSET, ask for a coding system. If it is a number, the |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2467 charset defined in `gnus-summary-show-article-charset-alist' is used." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2468 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2469 (save-excursion |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2470 (let ((inhibit-read-only t) |
31785 | 2471 charset) |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2472 (if read-charset |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2473 (if (or (and (numberp read-charset) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2474 (setq charset |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2475 (cdr |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2476 (assq read-charset |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2477 gnus-summary-show-article-charset-alist)))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2478 (setq charset (mm-read-coding-system "Charset: "))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2479 (let ((gnus-summary-show-article-charset-alist |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2480 (list (cons 1 charset)))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2481 (with-current-buffer gnus-summary-buffer |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2482 (gnus-summary-show-article 1))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2483 (error "No charset is given")) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2484 (when (gnus-buffer-live-p gnus-original-article-buffer) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2485 (with-current-buffer gnus-original-article-buffer |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2486 (let* ((ct (gnus-fetch-field "content-type")) |
68720
d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
2487 (ctl (and ct (mail-header-parse-content-type ct)))) |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2488 (setq charset (and ctl |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2489 (mail-content-type-get ctl 'charset))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2490 (when (stringp charset) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2491 (setq charset (intern (downcase charset))))))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2492 (unless charset |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2493 (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
|
2494 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2495 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2496 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2497 (narrow-to-region (point) (point-max)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2498 (let* ((func (or gnus-article-wash-function mm-text-html-renderer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2499 (entry (assq func mm-text-html-washer-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2500 (when entry |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2501 (setq func (cdr entry))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2502 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2503 ((functionp func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2504 (funcall func)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2505 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2506 (apply (car func) (cdr func)))))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2507 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2508 (defun gnus-article-wash-html-with-w3 () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2509 "Wash the current buffer with w3." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2510 (mm-setup-w3) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2511 (let ((w3-strict-width (window-width)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2512 (url-standalone-mode t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2513 (url-gateway-unplugged t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2514 (w3-honor-stylesheets nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2515 (condition-case () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2516 (w3-region (point-min) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2517 (error)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2518 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2519 (defun gnus-article-wash-html-with-w3m () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2520 "Wash the current buffer with emacs-w3m." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2521 (mm-setup-w3m) |
68129
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2522 (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2523 w3m-force-redisplay) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2524 (w3m-region (point-min) (point-max))) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2525 (when (and mm-inline-text-html-with-w3m-keymap |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2526 (boundp 'w3m-minor-mode-map) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2527 w3m-minor-mode-map) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2528 (add-text-properties |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2529 (point-min) (point-max) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2530 (list 'keymap w3m-minor-mode-map |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2531 ;; Put the mark meaning this part was rendered by emacs-w3m. |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2532 'mm-inline-text-html-with-w3m t)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2533 |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2534 (eval-when-compile (defvar charset)) ;; Bound by `article-wash-html'. |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2535 |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2536 (defun gnus-article-wash-html-with-w3m-standalone () |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2537 "Wash the current buffer with w3m." |
68380
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2538 (if (mm-w3m-standalone-supports-m17n-p) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2539 (progn |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2540 (unless (mm-coding-system-p charset) ;; Bound by `article-wash-html'. |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2541 ;; The default. |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2542 (setq charset 'iso-8859-1)) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2543 (let ((coding-system-for-write charset) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2544 (coding-system-for-read charset)) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2545 (call-process-region |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2546 (point-min) (point-max) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2547 "w3m" t t nil "-dump" "-T" "text/html" |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2548 "-I" (symbol-name charset) "-O" (symbol-name charset)))) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
68230
diff
changeset
|
2549 (mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html"))) |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
2550 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2551 (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
|
2552 "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
|
2553 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
|
2554 (interactive) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2555 (let ((inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2556 (regexp (if (consp gnus-list-identifiers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2557 (mapconcat 'identity gnus-list-identifiers " *\\|") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2558 gnus-list-identifiers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2559 (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2560 (when regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2561 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2562 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2563 (article-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2564 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2565 (while (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2566 (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2567 nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2568 (delete-region (match-beginning 2) (match-end 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2569 (beginning-of-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2570 (when (re-search-forward |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2571 "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2572 (delete-region (match-beginning 1) (match-end 1)))))))) |
17493 | 2573 |
2574 (defun article-hide-pem (&optional arg) | |
2575 "Toggle hiding of any PEM headers and signatures in the current article. | |
2576 If given a negative prefix, always show; if given a positive prefix, | |
2577 always hide." | |
2578 (interactive (gnus-article-hidden-arg)) | |
2579 (unless (gnus-article-check-hidden-text 'pem arg) | |
2580 (save-excursion | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2581 (let ((inhibit-read-only t) end) |
17493 | 2582 (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
|
2583 ;; 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
|
2584 (when (and (search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2585 "\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
|
2586 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2587 (setq end (1+ (match-beginning 0)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2588 (gnus-add-wash-type 'pem) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2589 (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
|
2590 end |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2591 (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
|
2592 (match-end 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2593 (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2594 'pem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2595 ;; 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
|
2596 (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
|
2597 nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2598 (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
|
2599 (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
|
2600 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2601 (defun article-strip-banner () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2602 "Strip the banners specified by the `banner' group parameter and by |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2603 `gnus-article-address-banner-alist'." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2604 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2605 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2606 (save-restriction |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2607 (let ((inhibit-point-motion-hooks t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2608 (when (gnus-parameter-banner gnus-newsgroup-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2609 (article-really-strip-banner |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2610 (gnus-parameter-banner gnus-newsgroup-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2611 (when gnus-article-address-banner-alist |
68940
808f636eb13e
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-93
Miles Bader <miles@gnu.org>
parents:
68720
diff
changeset
|
2612 ;; Note that the From header is decoded here, so it is |
808f636eb13e
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-93
Miles Bader <miles@gnu.org>
parents:
68720
diff
changeset
|
2613 ;; required that the *-extract-address-components function |
808f636eb13e
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-93
Miles Bader <miles@gnu.org>
parents:
68720
diff
changeset
|
2614 ;; supports non-ASCII text. |
68944
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2615 (let ((from (save-restriction |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2616 (widen) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2617 (article-narrow-to-head) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2618 (mail-fetch-field "from")))) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2619 (when (and from |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2620 (setq from |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2621 (cadr (funcall gnus-extract-address-components |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2622 from)))) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2623 (catch 'found |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2624 (dolist (pair gnus-article-address-banner-alist) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2625 (when (string-match (car pair) from) |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2626 (throw 'found |
5e2a9bb28073
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-94
Miles Bader <miles@gnu.org>
parents:
68940
diff
changeset
|
2627 (article-really-strip-banner (cdr pair))))))))))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2628 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2629 (defun article-really-strip-banner (banner) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2630 "Strip the banner specified by the argument." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2631 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2632 (save-restriction |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2633 (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
|
2634 (gnus-signature-limit nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2635 (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2636 (article-goto-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2637 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2638 ((eq banner 'signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2639 (when (gnus-article-narrow-to-signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2640 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2641 (forward-line -1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2642 (delete-region (point) (point-max)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2643 ((symbolp banner) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2644 (if (setq banner (cdr (assq banner gnus-article-banner-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2645 (while (re-search-forward banner nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2646 (delete-region (match-beginning 0) (match-end 0))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2647 ((stringp banner) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2648 (while (re-search-forward banner nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2649 (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
|
2650 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2651 (defun article-babel () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2652 "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
|
2653 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2654 (require 'babel) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2655 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2656 (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
|
2657 (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
|
2658 (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
|
2659 (start (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2660 (end (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2661 (orig (buffer-substring start end)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2662 (trans (babel-as-string orig))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2663 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2664 (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
|
2665 (delete-region start end) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2666 (insert trans)))))) |
17493 | 2667 |
2668 (defun article-hide-signature (&optional arg) | |
2669 "Hide the signature in the current article. | |
2670 If given a negative prefix, always show; if given a positive prefix, | |
2671 always hide." | |
2672 (interactive (gnus-article-hidden-arg)) | |
2673 (unless (gnus-article-check-hidden-text 'signature arg) | |
2674 (save-excursion | |
2675 (save-restriction | |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
2676 (let ((inhibit-read-only t)) |
17493 | 2677 (when (gnus-article-narrow-to-signature) |
2678 (gnus-article-hide-text-type | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2679 (point-min) (point-max) 'signature)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2680 (gnus-set-mode-line 'article)) |
17493 | 2681 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2682 (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
|
2683 "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
|
2684 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2685 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2686 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2687 (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
|
2688 (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
|
2689 (gnus-delete-line))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2690 |
17493 | 2691 (defun article-strip-leading-blank-lines () |
2692 "Remove all blank lines from the beginning of the article." | |
2693 (interactive) | |
2694 (save-excursion | |
2695 (let ((inhibit-point-motion-hooks t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2696 (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
|
2697 (when (article-goto-body) |
17493 | 2698 (while (and (not (eobp)) |
2699 (looking-at "[ \t]*$")) | |
2700 (gnus-delete-line)))))) | |
2701 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2702 (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
|
2703 "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
|
2704 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
|
2705 (narrow-to-region |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2706 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2707 (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
|
2708 (1- (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2709 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2710 (goto-char (point-min))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2711 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2712 (defun article-goto-body () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2713 "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
|
2714 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2715 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2716 ;; 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
|
2717 ;; MIME body parts. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2718 (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
|
2719 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2720 ((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
|
2721 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2722 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2723 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2724 nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2725 |
17493 | 2726 (defun article-strip-multiple-blank-lines () |
2727 "Replace consecutive blank lines with one empty line." | |
2728 (interactive) | |
2729 (save-excursion | |
2730 (let ((inhibit-point-motion-hooks t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2731 (inhibit-read-only t)) |
17493 | 2732 ;; 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
|
2733 (article-goto-body) |
17493 | 2734 (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
|
2735 (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
|
2736 (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
|
2737 (replace-match "" nil t))) |
17493 | 2738 ;; 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
|
2739 (article-goto-body) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2740 (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
|
2741 (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
|
2742 (match-beginning 0) (match-end 0)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2743 (delete-region (match-beginning 1) (match-end 1))))))) |
17493 | 2744 |
2745 (defun article-strip-leading-space () | |
2746 "Remove all white space from the beginning of the lines in the article." | |
2747 (interactive) | |
2748 (save-excursion | |
2749 (let ((inhibit-point-motion-hooks t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2750 (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
|
2751 (article-goto-body) |
17493 | 2752 (while (re-search-forward "^[ \t]+" nil t) |
2753 (replace-match "" t t))))) | |
2754 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2755 (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
|
2756 "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
|
2757 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2758 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2759 (let ((inhibit-point-motion-hooks t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2760 (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
|
2761 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2762 (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
|
2763 (replace-match "" t t))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2764 |
17493 | 2765 (defun article-strip-blank-lines () |
2766 "Strip leading, trailing and multiple blank lines." | |
2767 (interactive) | |
2768 (article-strip-leading-blank-lines) | |
2769 (article-remove-trailing-blank-lines) | |
2770 (article-strip-multiple-blank-lines)) | |
2771 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2772 (defun article-strip-all-blank-lines () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2773 "Strip all blank lines." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2774 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2775 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2776 (let ((inhibit-point-motion-hooks t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2777 (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
|
2778 (article-goto-body) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2779 (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
|
2780 (replace-match "" t t))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2781 |
17493 | 2782 (defun gnus-article-narrow-to-signature () |
2783 "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
|
2784 (let ((inhibit-point-motion-hooks t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2785 (when (gnus-article-search-signature) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2786 (forward-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2787 ;; 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
|
2788 ;; to be a signature. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2789 (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
|
2790 (list gnus-signature-limit))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2791 limit limited) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2792 (while (setq limit (pop limits)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2793 (if (or (and (integerp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2794 (< (- (point-max) (point)) limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2795 (and (floatp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2796 (< (count-lines (point) (point-max)) limit)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2797 (and (functionp limit) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2798 (funcall limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2799 (and (stringp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2800 (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
|
2801 () ; This limit did not succeed. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2802 (setq limited t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2803 limits nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2804 (unless limited |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2805 (narrow-to-region (point) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
2806 t))))) |
17493 | 2807 |
2808 (defun gnus-article-search-signature () | |
2809 "Search the current buffer for the signature separator. | |
2810 Put point at the beginning of the signature separator." | |
2811 (let ((cur (point))) | |
2812 (goto-char (point-max)) | |
2813 (if (if (stringp gnus-signature-separator) | |
2814 (re-search-backward gnus-signature-separator nil t) | |
2815 (let ((seps gnus-signature-separator)) | |
2816 (while (and seps | |
2817 (not (re-search-backward (car seps) nil t))) | |
2818 (pop seps)) | |
2819 seps)) | |
2820 t | |
2821 (goto-char cur) | |
2822 nil))) | |
2823 | |
2824 (defun gnus-article-hidden-arg () | |
2825 "Return the current prefix arg as a number, or 0 if no prefix." | |
2826 (list (if current-prefix-arg | |
2827 (prefix-numeric-value current-prefix-arg) | |
2828 0))) | |
2829 | |
2830 (defun gnus-article-check-hidden-text (type arg) | |
2831 "Return nil if hiding is necessary. | |
42206 | 2832 Arg can be nil or a number. nil and positive means hide, negative |
17493 | 2833 means show, 0 means toggle." |
2834 (save-excursion | |
2835 (save-restriction | |
2836 (let ((hide (gnus-article-hidden-text-p type))) | |
2837 (cond | |
2838 ((or (null arg) | |
2839 (> arg 0)) | |
2840 nil) | |
2841 ((< arg 0) | |
34833
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
2842 (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
|
2843 t) |
17493 | 2844 (t |
2845 (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
|
2846 (progn |
aaf69bc74739
* gnus-art.el (gnus-article-check-hidden-text): Return t.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
34818
diff
changeset
|
2847 (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
|
2848 t) |
17493 | 2849 nil))))))) |
2850 | |
2851 (defun gnus-article-hidden-text-p (type) | |
2852 "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
|
2853 (let ((pos (text-property-any (point-min) (point-max) 'article-type type))) |
17493 | 2854 (while (and pos |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2855 (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
|
2856 (not (get-text-property pos 'dummy-invisible))) |
17493 | 2857 (setq pos |
2858 (text-property-any (1+ pos) (point-max) 'article-type type))) | |
2859 (if pos | |
2860 'hidden | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2861 nil))) |
17493 | 2862 |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
2863 (defun gnus-article-show-hidden-text (type &optional dummy) |
17493 | 2864 "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
|
2865 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
|
2866 (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
|
2867 (inhibit-point-motion-hooks t)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2868 (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
|
2869 'article-type type |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
2870 (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
|
2871 (cons 'article-type (cons type |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2872 gnus-hidden-properties))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2873 (gnus-delete-wash-type type))) |
17493 | 2874 |
2875 (defconst article-time-units | |
2876 `((year . ,(* 365.25 24 60 60)) | |
2877 (week . ,(* 7 24 60 60)) | |
2878 (day . ,(* 24 60 60)) | |
2879 (hour . ,(* 60 60)) | |
2880 (minute . 60) | |
2881 (second . 1)) | |
2882 "Mapping from time units to seconds.") | |
2883 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2884 (defun gnus-article-forward-header () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2885 "Move point to the start of the next header. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2886 If the current header is a continuation header, this can be several |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2887 lines forward." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2888 (let ((ended nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2889 (while (not ended) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2890 (forward-line 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2891 (if (looking-at "[ \t]+[^ \t]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2892 (forward-line 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2893 (setq ended t))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2894 |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2895 (defun article-date-ut (&optional type highlight) |
17493 | 2896 "Convert DATE date to universal time in the current article. |
2897 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
|
2898 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
|
2899 `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
|
2900 should replace the \"Date:\" one, or should be added below it." |
17493 | 2901 (interactive (list 'ut t)) |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2902 (let* ((tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2903 (date-regexp (cond ((not gnus-article-date-lapsed-new-header) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2904 tdate-regexp) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2905 ((eq type 'lapsed) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2906 "^X-Sent:[ \t]") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2907 (article-lapsed-timer |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2908 "^Date:[ \t]") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2909 (t |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2910 tdate-regexp))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2911 (case-fold-search t) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2912 (inhibit-read-only t) |
17493 | 2913 (inhibit-point-motion-hooks t) |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2914 pos date bface eface) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2915 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2916 (save-restriction |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2917 (widen) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2918 (goto-char (point-min)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2919 (while (or (setq date (get-text-property (setq pos (point)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2920 'original-date)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2921 (when (setq pos (next-single-property-change |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2922 (point) 'original-date)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2923 (setq date (get-text-property pos 'original-date)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2924 t)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2925 (narrow-to-region pos (or (text-property-any pos (point-max) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2926 'original-date nil) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2927 (point-max))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2928 (goto-char (point-min)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2929 (when (re-search-forward tdate-regexp nil t) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2930 (setq bface (get-text-property (gnus-point-at-bol) 'face) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2931 eface (get-text-property (1- (gnus-point-at-eol)) 'face))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2932 (goto-char (point-min)) |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2933 (setq pos nil) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2934 ;; Delete any old Date headers. |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2935 (while (re-search-forward date-regexp nil t) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2936 (if pos |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2937 (delete-region (gnus-point-at-bol) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2938 (progn |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2939 (gnus-article-forward-header) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2940 (point))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2941 (delete-region (gnus-point-at-bol) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2942 (progn |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2943 (gnus-article-forward-header) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2944 (forward-char -1) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2945 (point))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2946 (setq pos (point)))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2947 (when (and (not pos) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2948 (re-search-forward tdate-regexp nil t)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2949 (forward-line 1)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2950 (gnus-goto-char pos) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2951 (insert (article-make-date-line date (or type 'ut))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2952 (unless pos |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2953 (insert "\n") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2954 (forward-line -1)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2955 ;; Do highlighting. |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2956 (beginning-of-line) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2957 (when (looking-at "\\([^:]+\\): *\\(.*\\)$") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2958 (put-text-property (match-beginning 1) (1+ (match-end 1)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2959 'face bface) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2960 (put-text-property (match-beginning 2) (match-end 2) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2961 'face eface)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2962 (put-text-property (point-min) (1- (point-max)) 'original-date date) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2963 (goto-char (point-max)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
2964 (widen)))))) |
17493 | 2965 |
2966 (defun article-make-date-line (date type) | |
2967 "Return a DATE line of TYPE." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2968 (unless (memq type '(local ut original user iso8601 lapsed english)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2969 (error "Unknown conversion type: %s" type)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2970 (condition-case () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2971 (let ((time (date-to-time date))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
2972 (cond |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2973 ;; Convert to the local timezone. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2974 ((eq type 'local) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2975 (let ((tz (car (current-time-zone time)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2976 (format "Date: %s %s%02d%02d" (current-time-string time) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2977 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2978 (/ (% (abs tz) 3600) 60)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2979 ;; Convert to Universal Time. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2980 ((eq type 'ut) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2981 (concat "Date: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2982 (current-time-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2983 (let* ((e (parse-time-string date)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2984 (tm (apply 'encode-time e)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2985 (ms (car tm)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2986 (ls (- (cadr tm) (car (current-time-zone time))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2987 (cond ((< ls 0) (list (1- ms) (+ ls 65536))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2988 ((> ls 65535) (list (1+ ms) (- ls 65536))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2989 (t (list ms ls))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2990 " UT")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2991 ;; Get the original date from the article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2992 ((eq type 'original) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2993 (concat "Date: " (if (string-match "\n+$" date) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2994 (substring date 0 (match-beginning 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2995 date))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2996 ;; Let the user define the format. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2997 ((eq type 'user) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2998 (let ((format (or (condition-case nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
2999 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3000 gnus-article-time-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3001 (error nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3002 gnus-article-time-format))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3003 (if (functionp format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3004 (funcall format time) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3005 (concat "Date: " (format-time-string format time))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3006 ;; ISO 8601. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3007 ((eq type 'iso8601) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3008 (let ((tz (car (current-time-zone time)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3009 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3010 "Date: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3011 (format-time-string "%Y%m%dT%H%M%S" time) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3012 (format "%s%02d%02d" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3013 (if (> tz 0) "+" "-") (/ (abs tz) 3600) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3014 (/ (% (abs tz) 3600) 60))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3015 ;; Do an X-Sent lapsed format. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3016 ((eq type 'lapsed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3017 ;; If the date is seriously mangled, the timezone functions are |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3018 ;; liable to bug out, so we ignore all errors. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3019 (let* ((now (current-time)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3020 (real-time (subtract-time now time)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3021 (real-sec (and real-time |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3022 (+ (* (float (car real-time)) 65536) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3023 (cadr real-time)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3024 (sec (and real-time (abs real-sec))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3025 num prev) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3026 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3027 ((null real-time) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3028 "X-Sent: Unknown") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3029 ((zerop sec) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3030 "X-Sent: Now") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3031 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3032 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3033 "X-Sent: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3034 ;; This is a bit convoluted, but basically we go |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3035 ;; through the time units for years, weeks, etc, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3036 ;; and divide things to see whether that results |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3037 ;; in positive answers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3038 (mapconcat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3039 (lambda (unit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3040 (if (zerop (setq num (ffloor (/ sec (cdr unit))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3041 ;; The (remaining) seconds are too few to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3042 ;; be divided into this time unit. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3043 "" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3044 ;; It's big enough, so we output it. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3045 (setq sec (- sec (* num (cdr unit)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3046 (prog1 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3047 (concat (if prev ", " "") (int-to-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3048 (floor num)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3049 " " (symbol-name (car unit)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3050 (if (> num 1) "s" "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3051 (setq prev t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3052 article-time-units "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3053 ;; If dates are odd, then it might appear like the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3054 ;; article was sent in the future. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3055 (if (> real-sec 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3056 " ago" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3057 " in the future")))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3058 ;; Display the date in proper English |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3059 ((eq type 'english) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3060 (let ((dtime (decode-time time))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3061 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3062 "Date: the " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3063 (number-to-string (nth 3 dtime)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3064 (let ((digit (% (nth 3 dtime) 10))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3065 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3066 ((memq (nth 3 dtime) '(11 12 13)) "th") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3067 ((= digit 1) "st") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3068 ((= digit 2) "nd") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3069 ((= digit 3) "rd") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3070 (t "th"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3071 " of " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3072 (nth (1- (nth 4 dtime)) gnus-english-month-names) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3073 " " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3074 (number-to-string (nth 5 dtime)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3075 " at " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3076 (format "%02d" (nth 2 dtime)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3077 ":" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3078 (format "%02d" (nth 1 dtime))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3079 (error |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3080 (format "Date: %s (from Gnus)" date)))) |
17493 | 3081 |
3082 (defun article-date-local (&optional highlight) | |
3083 "Convert the current article date to the local timezone." | |
3084 (interactive (list t)) | |
3085 (article-date-ut 'local highlight)) | |
3086 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3087 (defun article-date-english (&optional highlight) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3088 "Convert the current article date to something that is proper English." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3089 (interactive (list t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3090 (article-date-ut 'english highlight)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3091 |
17493 | 3092 (defun article-date-original (&optional highlight) |
3093 "Convert the current article date to what it was originally. | |
3094 This is only useful if you have used some other date conversion | |
3095 function and want to see what the date was before converting." | |
3096 (interactive (list t)) | |
3097 (article-date-ut 'original highlight)) | |
3098 | |
3099 (defun article-date-lapsed (&optional highlight) | |
3100 "Convert the current article date to time lapsed since it was sent." | |
3101 (interactive (list t)) | |
3102 (article-date-ut 'lapsed highlight)) | |
3103 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3104 (defun article-update-date-lapsed () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3105 "Function to be run from a timer to update the lapsed time line." |
63026
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3106 (save-match-data |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3107 (let (deactivate-mark) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3108 (save-excursion |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3109 (ignore-errors |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3110 (walk-windows |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3111 (lambda (w) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3112 (set-buffer (window-buffer w)) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3113 (when (eq major-mode 'gnus-article-mode) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3114 (let ((mark (point-marker))) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3115 (goto-char (point-min)) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3116 (when (re-search-forward "^X-Sent:" nil t) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3117 (article-date-lapsed t)) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3118 (goto-char (marker-position mark)) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3119 (move-marker mark nil)))) |
81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
62978
diff
changeset
|
3120 nil 'visible)))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3121 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3122 (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
|
3123 "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
|
3124 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
|
3125 is to run." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3126 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3127 (unless n |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3128 (setq n 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3129 (gnus-stop-date-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3130 (setq article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3131 (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
|
3132 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3133 (defun gnus-stop-date-timer () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3134 "Stop the X-Sent timer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3135 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3136 (when article-lapsed-timer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3137 (nnheader-cancel-timer article-lapsed-timer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3138 (setq article-lapsed-timer nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3139 |
17493 | 3140 (defun article-date-user (&optional highlight) |
3141 "Convert the current article date to the user-defined format. | |
3142 This format is defined by the `gnus-article-time-format' variable." | |
3143 (interactive (list t)) | |
3144 (article-date-ut 'user highlight)) | |
3145 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3146 (defun article-date-iso8601 (&optional highlight) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3147 "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
|
3148 (interactive (list t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3149 (article-date-ut 'iso8601 highlight)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3150 |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3151 (defmacro gnus-article-save-original-date (&rest forms) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3152 "Save the original date as a text property and evaluate FORMS." |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3153 `(let* ((case-fold-search t) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3154 (start (progn |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3155 (goto-char (point-min)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3156 (when (and (re-search-forward "^date:[\t\n ]+" nil t) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3157 (not (bolp))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3158 (match-end 0)))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3159 (date (when (and start |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3160 (re-search-forward "[\t ]*\n\\([^\t ]\\|\\'\\)" |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3161 nil t)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3162 (buffer-substring-no-properties start |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3163 (match-beginning 0))))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3164 (goto-char (point-max)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3165 (skip-chars-backward "\n") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3166 (put-text-property (point-min) (point) 'original-date date) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3167 ,@forms |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3168 (goto-char (point-max)) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3169 (skip-chars-backward "\n") |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3170 (put-text-property (point-min) (point) 'original-date date))) |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
3171 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3172 ;; (defun article-show-all () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3173 ;; "Show all hidden text in the article buffer." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3174 ;; (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3175 ;; (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3176 ;; (let ((inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3177 ;; (gnus-article-unhide-text (point-min) (point-max))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3178 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3179 (defun article-remove-leading-whitespace () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3180 "Remove excessive whitespace from all headers." |
17493 | 3181 (interactive) |
3182 (save-excursion | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3183 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3184 (let ((inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3185 (article-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3186 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3187 (while (re-search-forward "^[^ :]+: \\([ \t]+\\)" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3188 (delete-region (match-beginning 1) (match-end 1))))))) |
17493 | 3189 |
3190 (defun article-emphasize (&optional arg) | |
3191 "Emphasize text according to `gnus-emphasis-alist'." | |
3192 (interactive (gnus-article-hidden-arg)) | |
3193 (unless (gnus-article-check-hidden-text 'emphasis arg) | |
3194 (save-excursion | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3195 (let ((alist (or |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3196 (condition-case nil |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3197 (with-current-buffer gnus-summary-buffer |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3198 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
|
3199 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3200 gnus-emphasis-alist)) |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3201 (inhibit-read-only t) |
17493 | 3202 (props (append '(article-type emphasis) |
3203 gnus-hidden-properties)) | |
3204 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
|
3205 (article-goto-body) |
17493 | 3206 (setq beg (point)) |
3207 (while (setq elem (pop alist)) | |
3208 (goto-char beg) | |
3209 (setq regexp (car elem) | |
3210 invisible (nth 1 elem) | |
3211 visible (nth 2 elem) | |
3212 face (nth 3 elem)) | |
3213 (while (re-search-forward regexp nil t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3214 (when (and (match-beginning visible) (match-beginning invisible)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3215 (gnus-article-hide-text |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3216 (match-beginning invisible) (match-end invisible) props) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3217 (gnus-article-unhide-text-type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3218 (match-beginning visible) (match-end visible) 'emphasis) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3219 (gnus-put-overlay-excluding-newlines |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3220 (match-beginning visible) (match-end visible) 'face face) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3221 (gnus-add-wash-type 'emphasis) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3222 (goto-char (match-end invisible))))))))) |
17493 | 3223 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3224 (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
|
3225 "Setup newsgroup emphasis alist." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3226 (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
|
3227 (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
|
3228 (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
|
3229 (make-local-variable 'gnus-article-emphasis-alist) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3230 (setq gnus-article-emphasis-alist |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3231 (nconc |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3232 (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
|
3233 (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
|
3234 (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
|
3235 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3236 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
|
3237 highlight) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3238 (copy-sequence highlight-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3239 (if gnus-newsgroup-name |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3240 (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
|
3241 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
|
3242 gnus-emphasis-alist))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3243 |
35957
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
3244 (eval-when-compile |
a35d9c07d074
2001-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35838
diff
changeset
|
3245 (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
|
3246 (defvar gnus-summary-post-menu)) |
17493 | 3247 |
3248 ;;; Saving functions. | |
3249 | |
3250 (defun gnus-article-save (save-buffer file &optional num) | |
3251 "Save the currently selected article." | |
3252 (unless gnus-save-all-headers | |
3253 ;; Remove headers according to `gnus-saved-headers'. | |
3254 (let ((gnus-visible-headers | |
3255 (or gnus-saved-headers gnus-visible-headers)) | |
3256 (gnus-article-buffer save-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3257 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3258 (set-buffer save-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3259 (article-hide-headers 1 t)))) |
17493 | 3260 (save-window-excursion |
3261 (if (not gnus-default-article-saver) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3262 (error "No default saver is defined") |
17493 | 3263 ;; !!! 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
|
3264 ;; `gnus-save-article-buffer' (or so they think), but we |
17493 | 3265 ;; bind that variable to our save-buffer. |
3266 (set-buffer gnus-article-buffer) | |
3267 (let* ((gnus-save-article-buffer save-buffer) | |
3268 (filename | |
3269 (cond | |
3270 ((not gnus-prompt-before-saving) 'default) | |
3271 ((eq gnus-prompt-before-saving 'always) nil) | |
3272 (t file))) | |
3273 (gnus-number-of-articles-to-be-saved | |
3274 (when (eq gnus-prompt-before-saving t) | |
3275 num))) ; Magic | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3276 (set-buffer gnus-article-current-summary) |
17493 | 3277 (funcall gnus-default-article-saver filename))))) |
3278 | |
3279 (defun gnus-read-save-file-name (prompt &optional filename | |
3280 function group headers variable) | |
3281 (let ((default-name | |
3282 (funcall function group headers (symbol-value variable))) | |
3283 result) | |
33077 | 3284 (setq result |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3285 (expand-file-name |
33077 | 3286 (cond |
3287 ((eq filename 'default) | |
3288 default-name) | |
3289 ((eq filename t) | |
3290 default-name) | |
3291 (filename filename) | |
3292 (t | |
3293 (let* ((split-name (gnus-get-split-value gnus-split-methods)) | |
3294 (prompt | |
3295 (format prompt | |
3296 (if (and gnus-number-of-articles-to-be-saved | |
3297 (> gnus-number-of-articles-to-be-saved 1)) | |
3298 (format "these %d articles" | |
3299 gnus-number-of-articles-to-be-saved) | |
3300 "this article"))) | |
3301 (file | |
3302 ;; Let the split methods have their say. | |
3303 (cond | |
3304 ;; No split name was found. | |
3305 ((null split-name) | |
3306 (read-file-name | |
3307 (concat prompt " (default " | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3308 (file-name-nondirectory default-name) "): ") |
33077 | 3309 (file-name-directory default-name) |
3310 default-name)) | |
3311 ;; A single group name is returned. | |
3312 ((stringp split-name) | |
3313 (setq default-name | |
3314 (funcall function split-name headers | |
3315 (symbol-value variable))) | |
3316 (read-file-name | |
3317 (concat prompt " (default " | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3318 (file-name-nondirectory default-name) "): ") |
33077 | 3319 (file-name-directory default-name) |
3320 default-name)) | |
3321 ;; A single split name was found | |
3322 ((= 1 (length split-name)) | |
3323 (let* ((name (expand-file-name | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3324 (car split-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3325 gnus-article-save-directory)) |
33077 | 3326 (dir (cond ((file-directory-p name) |
3327 (file-name-as-directory name)) | |
3328 ((file-exists-p name) name) | |
3329 (t gnus-article-save-directory)))) | |
3330 (read-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3331 (concat prompt " (default " name "): ") |
33077 | 3332 dir name))) |
3333 ;; A list of splits was found. | |
3334 (t | |
3335 (setq split-name (nreverse split-name)) | |
3336 (let (result) | |
3337 (let ((file-name-history | |
3338 (nconc split-name file-name-history))) | |
3339 (setq result | |
3340 (expand-file-name | |
3341 (read-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3342 (concat prompt " (`M-p' for defaults): ") |
33077 | 3343 gnus-article-save-directory |
3344 (car split-name)) | |
3345 gnus-article-save-directory))) | |
3346 (car (push result file-name-history))))))) | |
3347 ;; Create the directory. | |
3348 (gnus-make-directory (file-name-directory file)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3349 ;; If we have read a directory, we append the default file name. |
33077 | 3350 (when (file-directory-p file) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3351 (setq file (expand-file-name (file-name-nondirectory |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3352 default-name) |
33077 | 3353 (file-name-as-directory file)))) |
3354 ;; Possibly translate some characters. | |
3355 (nnheader-translate-file-chars file)))))) | |
17493 | 3356 (gnus-make-directory (file-name-directory result)) |
3357 (set variable result))) | |
3358 | |
3359 (defun gnus-article-archive-name (group) | |
3360 "Return the first instance of an \"Archive-name\" in the current buffer." | |
3361 (let ((case-fold-search t)) | |
3362 (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) | |
3363 (nnheader-concat gnus-article-save-directory | |
3364 (match-string 1))))) | |
3365 | |
3366 (defun gnus-article-nndoc-name (group) | |
3367 "If GROUP is an nndoc group, return the name of the parent group." | |
3368 (when (eq (car (gnus-find-method-for-group group)) 'nndoc) | |
3369 (gnus-group-get-parameter group 'save-article-group))) | |
3370 | |
3371 (defun gnus-summary-save-in-rmail (&optional filename) | |
3372 "Append this article to Rmail file. | |
3373 Optional argument FILENAME specifies file name. | |
3374 Directory to save to is default to `gnus-article-save-directory'." | |
3375 (setq filename (gnus-read-save-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3376 "Save %s in rmail file" filename |
17493 | 3377 gnus-rmail-save-name gnus-newsgroup-name |
3378 gnus-current-headers 'gnus-newsgroup-last-rmail)) | |
3379 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
3380 (save-excursion | |
3381 (save-restriction | |
3382 (widen) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3383 (gnus-output-to-rmail filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3384 filename) |
17493 | 3385 |
3386 (defun gnus-summary-save-in-mail (&optional filename) | |
3387 "Append this article to Unix mail file. | |
3388 Optional argument FILENAME specifies file name. | |
3389 Directory to save to is default to `gnus-article-save-directory'." | |
3390 (setq filename (gnus-read-save-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3391 "Save %s in Unix mail file" filename |
17493 | 3392 gnus-mail-save-name gnus-newsgroup-name |
3393 gnus-current-headers 'gnus-newsgroup-last-mail)) | |
3394 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
3395 (save-excursion | |
3396 (save-restriction | |
3397 (widen) | |
3398 (if (and (file-readable-p filename) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3399 (file-regular-p filename) |
17493 | 3400 (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
|
3401 (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
|
3402 (gnus-output-to-mail filename))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3403 filename) |
17493 | 3404 |
3405 (defun gnus-summary-save-in-file (&optional filename overwrite) | |
3406 "Append this article to file. | |
3407 Optional argument FILENAME specifies file name. | |
3408 Directory to save to is default to `gnus-article-save-directory'." | |
3409 (setq filename (gnus-read-save-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3410 "Save %s in file" filename |
17493 | 3411 gnus-file-save-name gnus-newsgroup-name |
3412 gnus-current-headers 'gnus-newsgroup-last-file)) | |
3413 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
3414 (save-excursion | |
3415 (save-restriction | |
3416 (widen) | |
3417 (when (and overwrite | |
3418 (file-exists-p filename)) | |
3419 (delete-file filename)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3420 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3421 filename) |
17493 | 3422 |
3423 (defun gnus-summary-write-to-file (&optional filename) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3424 "Write this article to a file, overwriting it if the file exists. |
17493 | 3425 Optional argument FILENAME specifies file name. |
3426 The directory to save in defaults to `gnus-article-save-directory'." | |
3427 (gnus-summary-save-in-file nil t)) | |
3428 | |
3429 (defun gnus-summary-save-body-in-file (&optional filename) | |
3430 "Append this article body to a file. | |
3431 Optional argument FILENAME specifies file name. | |
3432 The directory to save in defaults to `gnus-article-save-directory'." | |
3433 (setq filename (gnus-read-save-file-name | |
65682
c16795de963a
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65616
diff
changeset
|
3434 "Save %s body in file" filename |
17493 | 3435 gnus-file-save-name gnus-newsgroup-name |
3436 gnus-current-headers 'gnus-newsgroup-last-file)) | |
3437 (gnus-eval-in-buffer-window gnus-save-article-buffer | |
3438 (save-excursion | |
3439 (save-restriction | |
3440 (widen) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3441 (when (article-goto-body) |
17493 | 3442 (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
|
3443 (gnus-output-to-file filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3444 filename) |
17493 | 3445 |
3446 (defun gnus-summary-save-in-pipe (&optional command) | |
3447 "Pipe this article to subprocess." | |
3448 (setq command | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3449 (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
|
3450 gnus-last-shell-command) |
17493 | 3451 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
|
3452 ((stringp command) |
53eebdb81828
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
35759
diff
changeset
|
3453 command) |
17493 | 3454 (t (read-string |
3455 (format | |
3456 "Shell command on %s: " | |
3457 (if (and gnus-number-of-articles-to-be-saved | |
3458 (> gnus-number-of-articles-to-be-saved 1)) | |
3459 (format "these %d articles" | |
3460 gnus-number-of-articles-to-be-saved) | |
3461 "this article")) | |
3462 gnus-last-shell-command)))) | |
3463 (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
|
3464 (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
|
3465 (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
|
3466 (error "A command is required"))) |
17493 | 3467 (gnus-eval-in-buffer-window gnus-article-buffer |
3468 (save-restriction | |
3469 (widen) | |
3470 (shell-command-on-region (point-min) (point-max) command nil))) | |
3471 (setq gnus-last-shell-command command)) | |
3472 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3473 (defmacro gnus-read-string (prompt &optional initial-contents history |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3474 default-value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3475 "Like `read-string' but allow for older XEmacsen that don't have the 5th arg." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3476 (if (and (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3477 (< emacs-minor-version 2)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3478 `(read-string ,prompt ,initial-contents ,history) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3479 `(read-string ,prompt ,initial-contents ,history ,default-value))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3480 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3481 (defun gnus-summary-pipe-to-muttprint (&optional command) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3482 "Pipe this article to muttprint." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3483 (setq command (gnus-read-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3484 "Print using command: " gnus-summary-muttprint-program |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3485 nil gnus-summary-muttprint-program)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3486 (gnus-summary-save-in-pipe command)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3487 |
17493 | 3488 ;;; Article file names when saving. |
3489 | |
3490 (defun gnus-capitalize-newsgroup (newsgroup) | |
3491 "Capitalize NEWSGROUP name." | |
3492 (when (not (zerop (length newsgroup))) | |
3493 (concat (char-to-string (upcase (aref newsgroup 0))) | |
3494 (substring newsgroup 1)))) | |
3495 | |
3496 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) | |
3497 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
3498 If variable `gnus-use-long-file-name' is non-nil, it is ~/News/News.group/num. | |
3499 Otherwise, it is like ~/News/news/group/num." | |
3500 (let ((default | |
3501 (expand-file-name | |
3502 (concat (if (gnus-use-long-file-name 'not-save) | |
3503 (gnus-capitalize-newsgroup newsgroup) | |
3504 (gnus-newsgroup-directory-form newsgroup)) | |
3505 "/" (int-to-string (mail-header-number headers))) | |
3506 gnus-article-save-directory))) | |
3507 (if (and last-file | |
3508 (string-equal (file-name-directory default) | |
3509 (file-name-directory last-file)) | |
3510 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
3511 default | |
3512 (or last-file default)))) | |
3513 | |
3514 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
3515 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
3516 If variable `gnus-use-long-file-name' is non-nil, it is | |
3517 ~/News/news.group/num. Otherwise, it is like ~/News/news/group/num." | |
3518 (let ((default | |
3519 (expand-file-name | |
3520 (concat (if (gnus-use-long-file-name 'not-save) | |
3521 newsgroup | |
3522 (gnus-newsgroup-directory-form newsgroup)) | |
3523 "/" (int-to-string (mail-header-number headers))) | |
3524 gnus-article-save-directory))) | |
3525 (if (and last-file | |
3526 (string-equal (file-name-directory default) | |
3527 (file-name-directory last-file)) | |
3528 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
3529 default | |
3530 (or last-file default)))) | |
3531 | |
3532 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
3533 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
3534 If variable `gnus-use-long-file-name' is non-nil, it is | |
3535 ~/News/news.group. Otherwise, it is like ~/News/news/group/news." | |
3536 (or last-file | |
3537 (expand-file-name | |
3538 (if (gnus-use-long-file-name 'not-save) | |
3539 newsgroup | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3540 (file-relative-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3541 (expand-file-name "news" (gnus-newsgroup-directory-form newsgroup)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3542 default-directory)) |
17493 | 3543 gnus-article-save-directory))) |
3544 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3545 (defun gnus-sender-save-name (newsgroup headers &optional last-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3546 "Generate file name from sender." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3547 (let ((from (mail-header-from headers))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3548 (expand-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3549 (if (and from (string-match "\\([^ <]+\\)@" from)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3550 (match-string 1 from) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3551 "nobody") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3552 gnus-article-save-directory))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3553 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3554 (defun article-verify-x-pgp-sig () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3555 "Verify X-PGP-Sig." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3556 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3557 (if (gnus-buffer-live-p gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3558 (let ((sig (with-current-buffer gnus-original-article-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3559 (gnus-fetch-field "X-PGP-Sig"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3560 items info headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3561 (when (and sig |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3562 mml2015-use |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3563 (mml2015-clear-verify-function)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3564 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3565 (insert-buffer-substring gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3566 (setq items (split-string sig)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3567 (message-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3568 (let ((inhibit-point-motion-hooks t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3569 (case-fold-search t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3570 ;; Don't verify multiple headers. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3571 (setq headers (mapconcat (lambda (header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3572 (concat header ": " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3573 (mail-fetch-field header) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3574 "\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3575 (split-string (nth 1 items) ",") ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3576 (delete-region (point-min) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3577 (insert "-----BEGIN PGP SIGNED MESSAGE-----\n\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3578 (insert "X-Signed-Headers: " (nth 1 items) "\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3579 (insert headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3580 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3581 (forward-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3582 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3583 (if (looking-at "^-") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3584 (insert "- ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3585 (forward-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3586 (insert "\n-----BEGIN PGP SIGNATURE-----\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3587 (insert "Version: " (car items) "\n\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3588 (insert (mapconcat 'identity (cddr items) "\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3589 (insert "\n-----END PGP SIGNATURE-----\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3590 (let ((mm-security-handle (list (format "multipart/signed")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3591 (mml2015-clean-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3592 (let ((coding-system-for-write (or gnus-newsgroup-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3593 'iso-8859-1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3594 (funcall (mml2015-clear-verify-function))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3595 (setq info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3596 (or (mm-handle-multipart-ctl-parameter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3597 mm-security-handle 'gnus-details) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3598 (mm-handle-multipart-ctl-parameter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3599 mm-security-handle 'gnus-info))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3600 (when info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3601 (let ((inhibit-read-only t) bface eface) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3602 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3603 (message-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3604 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3605 (forward-line -1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3606 (setq bface (get-text-property (gnus-point-at-bol) 'face) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3607 eface (get-text-property (1- (gnus-point-at-eol)) 'face)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3608 (message-remove-header "X-Gnus-PGP-Verify") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3609 (if (re-search-forward "^X-PGP-Sig:" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3610 (forward-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3611 (goto-char (point-max))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3612 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3613 (insert "X-Gnus-PGP-Verify: " info "\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3614 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3615 (forward-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3616 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3617 (if (not (looking-at "^[ \t]")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3618 (insert " ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3619 (forward-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3620 ;; Do highlighting. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3621 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3622 (when (looking-at "\\([^:]+\\): *") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3623 (put-text-property (match-beginning 1) (1+ (match-end 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3624 'face bface) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3625 (put-text-property (match-end 0) (point-max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3626 'face eface))))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3627 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3628 (defun article-verify-cancel-lock () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3629 "Verify Cancel-Lock header." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3630 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3631 (if (gnus-buffer-live-p gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3632 (canlock-verify gnus-original-article-buffer))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3633 |
17493 | 3634 (eval-and-compile |
3635 (mapcar | |
3636 (lambda (func) | |
3637 (let (afunc gfunc) | |
3638 (if (consp func) | |
3639 (setq afunc (car func) | |
3640 gfunc (cdr func)) | |
3641 (setq afunc func | |
3642 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
|
3643 (defalias gfunc |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3644 (when (fboundp afunc) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3645 `(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
|
3646 ,(documentation afunc t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3647 (interactive (list t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3648 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3649 (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
|
3650 (if interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3651 (call-interactively ',afunc) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3652 (apply ',afunc args)))))))) |
17493 | 3653 '(article-hide-headers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3654 article-verify-x-pgp-sig |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3655 article-verify-cancel-lock |
17493 | 3656 article-hide-boring-headers |
3657 article-treat-overstrike | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3658 article-fill-long-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3659 article-capitalize-sentences |
17493 | 3660 article-remove-cr |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3661 article-remove-leading-whitespace |
17493 | 3662 article-display-x-face |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3663 article-display-face |
17493 | 3664 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
|
3665 article-de-base64-unreadable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3666 article-decode-HZ |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3667 article-wash-html |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3668 article-unsplit-urls |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3669 article-hide-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3670 article-strip-banner |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3671 article-babel |
17493 | 3672 article-hide-pem |
3673 article-hide-signature | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3674 article-strip-headers-in-body |
17493 | 3675 article-remove-trailing-blank-lines |
3676 article-strip-leading-blank-lines | |
3677 article-strip-multiple-blank-lines | |
3678 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
|
3679 article-strip-trailing-space |
17493 | 3680 article-strip-blank-lines |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3681 article-strip-all-blank-lines |
17493 | 3682 article-date-local |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3683 article-date-english |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3684 article-date-iso8601 |
17493 | 3685 article-date-original |
3686 article-date-ut | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3687 article-decode-mime-words |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3688 article-decode-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3689 article-decode-encoded-words |
17493 | 3690 article-date-user |
3691 article-date-lapsed | |
3692 article-emphasize | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3693 article-treat-dumbquotes |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3694 article-normalize-headers |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3695 ;; (article-show-all . gnus-article-show-all-headers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3696 ))) |
17493 | 3697 |
3698 ;;; | |
3699 ;;; Gnus article mode | |
3700 ;;; | |
3701 | |
3702 (put 'gnus-article-mode 'mode-class 'special) | |
3703 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3704 (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
|
3705 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3706 (gnus-define-keys gnus-article-mode-map |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3707 " " gnus-article-goto-next-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3708 "\177" gnus-article-goto-prev-page |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3709 [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
|
3710 [backspace] gnus-article-goto-prev-page |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3711 "\C-c^" gnus-article-refer-article |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3712 "h" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3713 "s" gnus-article-show-summary |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3714 "\C-c\C-m" gnus-article-mail |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3715 "?" 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
|
3716 "e" gnus-summary-edit-article |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3717 "<" beginning-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3718 ">" end-of-buffer |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3719 "\C-c\C-i" gnus-info-find-node |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3720 "\C-c\C-b" gnus-bug |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3721 "R" gnus-article-reply-with-original |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3722 "F" gnus-article-followup-with-original |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
3723 "\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
|
3724 "\C-hc" gnus-article-describe-key-briefly |
17493 | 3725 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3726 "\C-d" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3727 "\M-*" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3728 "\M-#" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3729 "\M-^" gnus-article-read-summary-keys |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3730 "\M-g" gnus-article-read-summary-keys) |
17493 | 3731 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3732 (substitute-key-definition |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
3733 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) |
17493 | 3734 |
3735 (defun gnus-article-make-menu-bar () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3736 (unless (boundp 'gnus-article-commands-menu) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3737 (gnus-summary-make-menu-bar)) |
17493 | 3738 (gnus-turn-off-edit-menu 'article) |
3739 (unless (boundp 'gnus-article-article-menu) | |
3740 (easy-menu-define | |
3741 gnus-article-article-menu gnus-article-mode-map "" | |
3742 '("Article" | |
3743 ["Scroll forwards" gnus-article-goto-next-page t] | |
3744 ["Scroll backwards" gnus-article-goto-prev-page t] | |
3745 ["Show summary" gnus-article-show-summary t] | |
3746 ["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
|
3747 ["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
|
3748 ["Send a bug report" gnus-bug t])) |
17493 | 3749 |
3750 (easy-menu-define | |
3751 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
|
3752 ;; Fixme: this should use :active (and maybe :visible). |
17493 | 3753 '("Treatment" |
3754 ["Hide headers" gnus-article-hide-headers t] | |
3755 ["Hide signature" gnus-article-hide-signature t] | |
3756 ["Hide citation" gnus-article-hide-citation t] | |
3757 ["Treat overstrike" gnus-article-treat-overstrike t] | |
3758 ["Remove carriage return" gnus-article-remove-cr t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3759 ["Remove leading whitespace" gnus-article-remove-leading-whitespace t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3760 ["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
|
3761 ["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
|
3762 ["Treat html" gnus-article-wash-html t] |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3763 ["Remove newlines from within URLs" gnus-article-unsplit-urls t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3764 ["Decode HZ" gnus-article-decode-HZ t])) |
17493 | 3765 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3766 ;; Note "Commands" menu is defined in gnus-sum.el for consistency |
17493 | 3767 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3768 ;; Note "Post" menu is defined in gnus-sum.el for consistency |
17493 | 3769 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3770 (gnus-run-hooks 'gnus-article-menu-hook))) |
17493 | 3771 |
3772 (defun gnus-article-mode () | |
3773 "Major mode for displaying an article. | |
3774 | |
3775 All normal editing commands are switched off. | |
3776 | |
3777 The following commands are available in addition to all summary mode | |
3778 commands: | |
3779 \\<gnus-article-mode-map> | |
3780 \\[gnus-article-next-page]\t Scroll the article one page forwards | |
3781 \\[gnus-article-prev-page]\t Scroll the article one page backwards | |
3782 \\[gnus-article-refer-article]\t Go to the article referred to by an article id near point | |
3783 \\[gnus-article-show-summary]\t Display the summary buffer | |
3784 \\[gnus-article-mail]\t Send a reply to the address near point | |
3785 \\[gnus-article-describe-briefly]\t Describe the current mode briefly | |
3786 \\[gnus-info-find-node]\t Go to the Gnus info node" | |
3787 (interactive) | |
63689
376c123a5378
(gnus-article-mode): Use kill-all-local-variables.
Lute Kamstra <lute@gnu.org>
parents:
63491
diff
changeset
|
3788 (kill-all-local-variables) |
17493 | 3789 (gnus-simplify-mode-line) |
3790 (setq mode-name "Article") | |
3791 (setq major-mode 'gnus-article-mode) | |
3792 (make-local-variable 'minor-mode-alist) | |
3793 (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
|
3794 (when (gnus-visual-p 'article-menu 'menu) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3795 (gnus-article-make-menu-bar) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3796 (when gnus-summary-tool-bar-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3797 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))) |
17493 | 3798 (gnus-update-format-specifications nil 'article-mode) |
3799 (set (make-local-variable 'page-delimiter) gnus-page-delimiter) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3800 (set (make-local-variable 'gnus-page-broken) nil) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3801 (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
|
3802 (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
|
3803 (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
|
3804 (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
|
3805 (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
|
3806 (make-local-variable 'gnus-article-wash-types) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3807 (make-local-variable 'gnus-article-image-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3808 (make-local-variable 'gnus-article-charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3809 (make-local-variable 'gnus-article-ignored-charsets) |
59806
06561ecd74ea
(gnus-article-mode): Turn off the "\ " non-break space.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
59764
diff
changeset
|
3810 ;; Prevent recent Emacsen from displaying non-break space as "\ ". |
63738
aa5963346291
(gnus-article-mode): Set `nobreak-char-display', not `show-nonbreak-escape'.
Juanma Barranquero <lekktu@gmail.com>
parents:
63689
diff
changeset
|
3811 (set (make-local-variable 'nobreak-char-display) nil) |
70044
027c07dcdee5
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-225
Miles Bader <miles@gnu.org>
parents:
69949
diff
changeset
|
3812 (setq cursor-in-non-selected-windows nil) |
17493 | 3813 (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
|
3814 (buffer-disable-undo) |
17493 | 3815 (setq buffer-read-only t) |
3816 (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
|
3817 (mm-enable-multibyte) |
62890
4b7fa3ee8e9e
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336
Miles Bader <miles@gnu.org>
parents:
62755
diff
changeset
|
3818 (gnus-run-mode-hooks 'gnus-article-mode-hook)) |
17493 | 3819 |
3820 (defun gnus-article-setup-buffer () | |
3821 "Initialize the article buffer." | |
3822 (let* ((name (if gnus-single-article-buffer "*Article*" | |
3823 (concat "*Article " gnus-newsgroup-name "*"))) | |
3824 (original | |
3825 (progn (string-match "\\*Article" name) | |
3826 (concat " *Original Article" | |
3827 (substring name (match-end 0)))))) | |
3828 (setq gnus-article-buffer name) | |
3829 (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
|
3830 (setq gnus-article-mime-handle-alist nil) |
17493 | 3831 ;; This might be a variable local to the summary buffer. |
3832 (unless gnus-single-article-buffer | |
3833 (save-excursion | |
3834 (set-buffer gnus-summary-buffer) | |
3835 (setq gnus-article-buffer name) | |
3836 (setq gnus-original-article-buffer original) | |
3837 (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
|
3838 (gnus-article-setup-highlight-words) |
17493 | 3839 ;; Init original article buffer. |
3840 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3841 (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
|
3842 (mm-enable-multibyte) |
17493 | 3843 (setq major-mode 'gnus-original-article-mode) |
3844 (make-local-variable 'gnus-original-article)) | |
59764
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3845 (if (and (get-buffer name) |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3846 (with-current-buffer name |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3847 (if gnus-article-edit-mode |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3848 (if (y-or-n-p "Article mode edit in progress; discard? ") |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3849 (progn |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3850 (set-buffer-modified-p nil) |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3851 (gnus-kill-buffer name) |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3852 (message "") |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3853 nil) |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3854 (error "Action aborted")) |
472e5513512f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Miles Bader <miles@gnu.org>
parents:
58857
diff
changeset
|
3855 t))) |
17493 | 3856 (save-excursion |
3857 (set-buffer name) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3858 (set (make-local-variable 'gnus-article-edit-mode) nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3859 (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
|
3860 (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
|
3861 (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
|
3862 ;; Set it to nil in article-buffer! |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
3863 (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
|
3864 (buffer-disable-undo) |
17493 | 3865 (setq buffer-read-only t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3866 ;; This list just keeps growing if we don't reset it. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3867 (setq gnus-button-marker-list nil) |
17493 | 3868 (unless (eq major-mode 'gnus-article-mode) |
3869 (gnus-article-mode)) | |
3870 (current-buffer)) | |
3871 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3872 (set-buffer (gnus-get-buffer-create name)) |
17493 | 3873 (gnus-article-mode) |
3874 (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
|
3875 (gnus-summary-set-local-parameters gnus-newsgroup-name) |
17493 | 3876 (current-buffer))))) |
3877 | |
3878 ;; Set article window start at LINE, where LINE is the number of lines | |
3879 ;; from the head of the article. | |
3880 (defun gnus-article-set-window-start (&optional line) | |
3881 (set-window-start | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3882 (gnus-get-buffer-window gnus-article-buffer t) |
17493 | 3883 (save-excursion |
3884 (set-buffer gnus-article-buffer) | |
3885 (goto-char (point-min)) | |
3886 (if (not line) | |
3887 (point-min) | |
3888 (gnus-message 6 "Moved to bookmark") | |
3889 (search-forward "\n\n" nil t) | |
3890 (forward-line line) | |
3891 (point))))) | |
3892 | |
3893 (defun gnus-article-prepare (article &optional all-headers header) | |
3894 "Prepare ARTICLE in article mode buffer. | |
3895 ARTICLE should either be an article number or a Message-ID. | |
3896 If ARTICLE is an id, HEADER should be the article headers. | |
3897 If ALL-HEADERS is non-nil, no headers are hidden." | |
3898 (save-excursion | |
3899 ;; Make sure we start in a summary buffer. | |
3900 (unless (eq major-mode 'gnus-summary-mode) | |
3901 (set-buffer gnus-summary-buffer)) | |
3902 (setq gnus-summary-buffer (current-buffer)) | |
3903 (let* ((gnus-article (if header (mail-header-number header) article)) | |
3904 (summary-buffer (current-buffer)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3905 (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) |
17493 | 3906 (group gnus-newsgroup-name) |
3907 result) | |
3908 (save-excursion | |
3909 (gnus-article-setup-buffer) | |
3910 (set-buffer gnus-article-buffer) | |
3911 ;; Deactivate active regions. | |
3912 (when (and (boundp 'transient-mark-mode) | |
3913 transient-mark-mode) | |
3914 (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
|
3915 (if (not (setq result (let ((inhibit-read-only t)) |
17493 | 3916 (gnus-request-article-this-buffer |
3917 article group)))) | |
3918 ;; There is no such article. | |
3919 (save-excursion | |
3920 (when (and (numberp article) | |
3921 (not (memq article gnus-newsgroup-sparse))) | |
3922 (setq gnus-article-current | |
3923 (cons gnus-newsgroup-name article)) | |
3924 (set-buffer gnus-summary-buffer) | |
3925 (setq gnus-current-article article) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3926 (if (and (memq article gnus-newsgroup-undownloaded) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3927 (not (gnus-online (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3928 gnus-newsgroup-name)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3929 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3930 (gnus-summary-set-agent-mark article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3931 (message "Message marked for downloading")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3932 (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
|
3933 (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
|
3934 (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
|
3935 (if (or (eq result 'pseudo) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3936 (eq result 'nneething)) |
17493 | 3937 (progn |
3938 (save-excursion | |
3939 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3940 (push article gnus-newsgroup-history) |
17493 | 3941 (setq gnus-last-article gnus-current-article |
3942 gnus-current-article 0 | |
3943 gnus-current-headers nil | |
3944 gnus-article-current nil) | |
3945 (if (eq result 'nneething) | |
3946 (gnus-configure-windows 'summary) | |
3947 (gnus-configure-windows 'article)) | |
3948 (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
|
3949 (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
|
3950 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
|
3951 (gnus-set-mode-line 'article))) |
17493 | 3952 ;; The result from the `request' was an actual article - |
3953 ;; or at least some text that is now displayed in the | |
3954 ;; article buffer. | |
3955 (when (and (numberp article) | |
3956 (not (eq article gnus-current-article))) | |
3957 ;; Seems like a new article has been selected. | |
3958 ;; `gnus-current-article' must be an article number. | |
3959 (save-excursion | |
3960 (set-buffer summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3961 (push article gnus-newsgroup-history) |
17493 | 3962 (setq gnus-last-article gnus-current-article |
3963 gnus-current-article article | |
3964 gnus-current-headers | |
3965 (gnus-summary-article-header gnus-current-article) | |
3966 gnus-article-current | |
3967 (cons gnus-newsgroup-name gnus-current-article)) | |
3968 (unless (vectorp gnus-current-headers) | |
3969 (setq gnus-current-headers nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3970 (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
|
3971 (when (gnus-summary-show-thread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3972 ;; 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
|
3973 ;; 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
|
3974 ;; 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
|
3975 ;; So we go again. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3976 (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
|
3977 (gnus-run-hooks 'gnus-mark-article-hook) |
17493 | 3978 (gnus-set-mode-line 'summary) |
3979 (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
|
3980 (gnus-run-hooks 'gnus-visual-mark-article-hook)) |
17493 | 3981 ;; Set the global newsgroup variables here. |
3982 (gnus-set-global-variables) | |
3983 (setq gnus-have-all-headers | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
3984 (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
|
3985 (save-excursion |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
3986 (gnus-configure-windows 'article)) |
17493 | 3987 (when (or (numberp article) |
3988 (stringp article)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3989 (gnus-article-prepare-display) |
17493 | 3990 ;; Do page break. |
3991 (goto-char (point-min)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3992 (when gnus-break-pages |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3993 (gnus-narrow-to-page))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
3994 (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
|
3995 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
|
3996 (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
|
3997 (article-goto-body) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3998 (unless (bobp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
3999 (forward-line -1)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4000 (set-window-point (get-buffer-window (current-buffer)) (point)) |
17493 | 4001 (gnus-configure-windows 'article) |
4002 t)))))) | |
4003 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4004 ;;;###autoload |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4005 (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
|
4006 "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
|
4007 ;; 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
|
4008 ;; 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
|
4009 (let ((gnus-article-buffer (current-buffer)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4010 buffer-read-only |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4011 (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
|
4012 (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
|
4013 (gnus-article-mode)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4014 (setq buffer-read-only nil |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4015 gnus-article-wash-types nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4016 gnus-article-image-alist nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4017 (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
|
4018 (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
|
4019 (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
|
4020 (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
|
4021 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4022 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4023 ;;; Gnus MIME viewing functions |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4024 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4025 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4026 (defvar gnus-mime-button-line-format "%{%([%p. %d%T]%)%}%e\n" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4027 "Format of the MIME buttons. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4028 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4029 Valid specifiers include: |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4030 %t The MIME type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4031 %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
|
4032 %n The `name' parameter |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4033 %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
|
4034 %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
|
4035 %p The part identifier number |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4036 %e Dots if the part isn't displayed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4037 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4038 General format specifiers can also be used. See Info node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4039 `(gnus)Formatting Variables'.") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4040 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4041 (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
|
4042 '((?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
|
4043 (?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
|
4044 (?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
|
4045 (?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
|
4046 (?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
|
4047 (?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
|
4048 (?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
|
4049 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4050 (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
|
4051 '((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
|
4052 (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
|
4053 (gnus-mime-view-part-as-type "t" "View As Type...") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4054 (gnus-mime-view-part-as-charset "C" "View As charset...") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4055 (gnus-mime-save-part "o" "Save...") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4056 (gnus-mime-save-part-and-strip "\C-o" "Save and Strip") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4057 (gnus-mime-delete-part "d" "Delete part") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4058 (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
|
4059 (gnus-mime-inline-part "i" "View As Text, In This Buffer") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4060 (gnus-mime-view-part-internally "E" "View Internally") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4061 (gnus-mime-view-part-externally "e" "View Externally") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4062 (gnus-mime-print-part "p" "Print") |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4063 (gnus-mime-pipe-part "|" "Pipe To Command...") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4064 (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
|
4065 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4066 (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
|
4067 (if gnus-article-mime-handle-alist-1 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4068 (if (eq 1 (length gnus-article-mime-handle-alist-1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4069 " (1 part)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4070 (format " (%d parts)" (length gnus-article-mime-handle-alist-1))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4071 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4072 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4073 (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
|
4074 (let ((map (make-sparse-keymap))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4075 (unless (>= (string-to-number emacs-version) 21) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4076 ;; XEmacs doesn't care. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4077 (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
|
4078 (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
|
4079 (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
|
4080 (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
|
4081 (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
|
4082 map)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4083 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4084 (easy-menu-define |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4085 gnus-mime-button-menu gnus-mime-button-map "MIME button menu." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4086 `("MIME Part" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4087 ,@(mapcar (lambda (c) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4088 (vector (caddr c) (car c) :enable t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4089 gnus-mime-button-commands))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4090 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4091 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4092 (define-compiler-macro popup-menu (&whole form |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4093 menu &optional position prefix) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4094 (if (and (fboundp 'popup-menu) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4095 (not (memq 'popup-menu (assoc "lmenu" load-history)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4096 form |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4097 ;; Gnus is probably running under Emacs 20. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4098 `(let* ((menu (cdr ,menu)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4099 (response (x-popup-menu |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4100 t (list (car menu) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4101 (cons "" (mapcar (lambda (c) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4102 (cons (caddr c) (car c))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4103 (cdr menu))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4104 (if response |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4105 (call-interactively (nth 3 (assq response menu)))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4106 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4107 (defun gnus-mime-button-menu (event prefix) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4108 "Construct a context-sensitive menu of MIME commands." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4109 (interactive "e\nP") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4110 (save-window-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4111 (let ((pos (event-start event))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4112 (select-window (posn-window pos)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4113 (goto-char (posn-point pos)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4114 (gnus-article-check-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4115 (popup-menu gnus-mime-button-menu nil prefix)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4116 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4117 (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
|
4118 "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
|
4119 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4120 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4121 (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
|
4122 (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
|
4123 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4124 (mail-parse-ignored-charsets |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4125 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4126 gnus-newsgroup-ignored-charsets))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4127 (when handles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4128 (mm-remove-parts handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4129 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4130 (or (search-forward "\n\n") (goto-char (point-max))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4131 (let ((inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4132 (delete-region (point) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4133 (mm-display-parts handles)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4134 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4135 (defun gnus-mime-save-part-and-strip () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4136 "Save the MIME part under point then replace it with an external body." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4137 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4138 (gnus-article-check-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4139 (when (gnus-group-read-only-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4140 (error "The current group does not support deleting of parts")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4141 (when (mm-complicated-handles gnus-article-mime-handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4142 (error "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4143 The current article has a complicated MIME structure, giving up...")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4144 (when (gnus-yes-or-no-p "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4145 Deleting parts may malfunction or destroy the article; continue? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4146 (let* ((data (get-text-property (point) 'gnus-data)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4147 file param |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4148 (handles gnus-article-mime-handles)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4149 (setq file (and data (mm-save-part data))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4150 (when file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4151 (with-current-buffer (mm-handle-buffer data) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4152 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4153 (insert "Content-Type: " (mm-handle-media-type data)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4154 (mml-insert-parameter-string (cdr (mm-handle-type data)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4155 '(charset)) |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4156 ;; Add a filename for the sake of saving the part again. |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4157 (mml-insert-parameter |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4158 (mail-header-encode-parameter "name" (file-name-nondirectory file))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4159 (insert "\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4160 (insert "Content-ID: " (message-make-message-id) "\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4161 (insert "Content-Transfer-Encoding: binary\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4162 (insert "\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4163 (setcdr data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4164 (cdr (mm-make-handle nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4165 `("message/external-body" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4166 (access-type . "LOCAL-FILE") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4167 (name . ,file))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4168 (set-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4169 (gnus-article-edit-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4170 `(lambda () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4171 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4172 (let ((mail-parse-charset (or gnus-article-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4173 ',gnus-newsgroup-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4174 (mail-parse-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4175 (or gnus-article-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4176 ',gnus-newsgroup-ignored-charsets)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4177 (mbl mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4178 (setq mml-buffer-list nil) |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
4179 (insert-buffer-substring gnus-original-article-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4180 (mime-to-mml ',handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4181 (setq gnus-article-mime-handles nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4182 (let ((mbl1 mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4183 (setq mml-buffer-list mbl) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4184 (set (make-local-variable 'mml-buffer-list) mbl1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4185 (gnus-make-local-hook 'kill-buffer-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4186 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4187 `(lambda (no-highlight) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4188 (let ((mail-parse-charset (or gnus-article-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4189 ',gnus-newsgroup-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4190 (message-options message-options) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4191 (message-options-set-recipient) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4192 (mail-parse-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4193 (or gnus-article-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4194 ',gnus-newsgroup-ignored-charsets))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4195 (mml-to-mime) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4196 (mml-destroy-buffers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4197 (remove-hook 'kill-buffer-hook |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4198 'mml-destroy-buffers t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4199 (kill-local-variable 'mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4200 (gnus-summary-edit-article-done |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4201 ,(or (mail-header-references gnus-current-headers) "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4202 ,(gnus-group-read-only-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4203 ,gnus-summary-buffer no-highlight))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4204 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4205 (defun gnus-mime-delete-part () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4206 "Delete the MIME part under point. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4207 Replace it with some information about the removed part." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4208 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4209 (gnus-article-check-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4210 (when (gnus-group-read-only-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4211 (error "The current group does not support deleting of parts")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4212 (when (mm-complicated-handles gnus-article-mime-handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4213 (error "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4214 The current article has a complicated MIME structure, giving up...")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4215 (when (gnus-yes-or-no-p "\ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4216 Deleting parts may malfunction or destroy the article; continue? ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4217 (let* ((data (get-text-property (point) 'gnus-data)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4218 (handles gnus-article-mime-handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4219 (none "(none)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4220 (description |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4221 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4222 (mail-decode-encoded-word-string (or (mm-handle-description data) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4223 none)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4224 (filename |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4225 (or (mail-content-type-get (mm-handle-disposition data) 'filename) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4226 none)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4227 (type (mm-handle-media-type data))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4228 (unless data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4229 (error "No MIME part under point")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4230 (with-current-buffer (mm-handle-buffer data) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4231 (let ((bsize (format "%s" (buffer-size)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4232 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4233 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4234 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4235 ",----\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4236 "| The following attachment has been deleted:\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4237 "|\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4238 "| Type: " type "\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4239 "| Filename: " filename "\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4240 "| Size (encoded): " bsize " Byte\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4241 "| Description: " description "\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4242 "`----\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4243 (setcdr data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4244 (cdr (mm-make-handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4245 nil `("text/plain") nil nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4246 (list "attachment") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4247 (format "Deleted attachment (%s bytes)" bsize)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4248 (set-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4249 ;; FIXME: maybe some of the following code (borrowed from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4250 ;; `gnus-mime-save-part-and-strip') isn't necessary? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4251 (gnus-article-edit-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4252 `(lambda () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4253 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4254 (let ((mail-parse-charset (or gnus-article-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4255 ',gnus-newsgroup-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4256 (mail-parse-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4257 (or gnus-article-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4258 ',gnus-newsgroup-ignored-charsets)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4259 (mbl mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4260 (setq mml-buffer-list nil) |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
4261 (insert-buffer-substring gnus-original-article-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4262 (mime-to-mml ',handles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4263 (setq gnus-article-mime-handles nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4264 (let ((mbl1 mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4265 (setq mml-buffer-list mbl) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4266 (set (make-local-variable 'mml-buffer-list) mbl1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4267 (gnus-make-local-hook 'kill-buffer-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4268 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4269 `(lambda (no-highlight) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4270 (let ((mail-parse-charset (or gnus-article-charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4271 ',gnus-newsgroup-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4272 (message-options message-options) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4273 (message-options-set-recipient) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4274 (mail-parse-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4275 (or gnus-article-ignored-charsets |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4276 ',gnus-newsgroup-ignored-charsets))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4277 (mml-to-mime) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4278 (mml-destroy-buffers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4279 (remove-hook 'kill-buffer-hook |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4280 'mml-destroy-buffers t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4281 (kill-local-variable 'mml-buffer-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4282 (gnus-summary-edit-article-done |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4283 ,(or (mail-header-references gnus-current-headers) "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4284 ,(gnus-group-read-only-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4285 ,gnus-summary-buffer no-highlight))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4286 ;; Not in `gnus-mime-save-part-and-strip': |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4287 (gnus-article-edit-done) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4288 (gnus-summary-expand-window) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4289 (gnus-summary-show-article)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4290 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4291 (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
|
4292 "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
|
4293 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4294 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4295 (let ((data (get-text-property (point) 'gnus-data))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4296 (when data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4297 (mm-save-part data)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4298 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4299 (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
|
4300 "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
|
4301 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4302 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4303 (let ((data (get-text-property (point) 'gnus-data))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4304 (when data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4305 (mm-pipe-part data)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4306 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4307 (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
|
4308 "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
|
4309 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4310 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4311 (let ((data (get-text-property (point) 'gnus-data))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4312 (when data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4313 (setq gnus-article-mime-handles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4314 (mm-merge-handles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4315 gnus-article-mime-handles (setq data (copy-sequence data)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4316 (mm-interactively-view-part data)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4317 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4318 (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
|
4319 (gnus-article-check-buffer) |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4320 (let* ((handle (get-text-property (point) 'gnus-data)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4321 (name (or |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4322 ;; Content-Type: foo/bar; name=... |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4323 (mail-content-type-get (mm-handle-type handle) 'name) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4324 ;; Content-Disposition: attachment; filename=... |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4325 (cdr (assq 'filename (cdr (mm-handle-disposition handle)))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4326 (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
|
4327 (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
|
4328 |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4329 (defun gnus-mime-view-part-as-type (&optional mime-type pred) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4330 "Choose a MIME media type, and view the part as such. |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4331 If non-nil, PRED is a predicate to use during completion to limit the |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4332 available media-types." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4333 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4334 (unless mime-type |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4335 (setq mime-type |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4336 (let ((default (gnus-mime-view-part-as-type-internal))) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4337 (completing-read |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4338 (format "View as MIME type (default %s): " |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4339 (car default)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4340 (mapcar #'list (mailcap-mime-types)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4341 pred nil nil nil |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4342 (car default))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4343 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4344 (let ((handle (get-text-property (point) 'gnus-data))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4345 (when handle |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4346 (when (equal (mm-handle-media-type handle) "message/external-body") |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4347 (unless (mm-handle-cache handle) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4348 (mm-extern-cache-contents handle)) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4349 (setq handle (mm-handle-cache handle))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4350 (setq handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4351 (mm-make-handle (mm-handle-buffer handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4352 (cons mime-type (cdr (mm-handle-type handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4353 (mm-handle-encoding handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4354 (mm-handle-undisplayer handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4355 (mm-handle-disposition handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4356 (mm-handle-description handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4357 nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4358 (mm-handle-id handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4359 (setq gnus-article-mime-handles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4360 (mm-merge-handles gnus-article-mime-handles handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4361 (gnus-mm-display-part handle)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4362 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4363 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4364 (require 'jka-compr)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4365 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4366 ;; jka-compr.el uses a "sh -c" to direct stderr to err-file, but these days |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4367 ;; emacs can do that itself. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4368 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4369 (defun gnus-mime-jka-compr-maybe-uncompress () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4370 "Uncompress the current buffer if `auto-compression-mode' is enabled. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4371 The uncompress method used is derived from `buffer-file-name'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4372 (when (and (fboundp 'jka-compr-installed-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4373 (jka-compr-installed-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4374 (let ((info (jka-compr-get-compression-info buffer-file-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4375 (when info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4376 (let ((basename (file-name-nondirectory buffer-file-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4377 (args (jka-compr-info-uncompress-args info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4378 (prog (jka-compr-info-uncompress-program info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4379 (message (jka-compr-info-uncompress-message info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4380 (err-file (jka-compr-make-temp-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4381 (if message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4382 (message "%s %s..." message basename)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4383 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4384 (unless (memq (apply 'call-process-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4385 (point-min) (point-max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4386 prog |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4387 t (list t err-file) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4388 args) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4389 jka-compr-acceptable-retval-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4390 (jka-compr-error prog args basename message err-file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4391 (jka-compr-delete-temp-file err-file))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4392 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4393 (defun gnus-mime-copy-part (&optional handle) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4394 "Put the MIME part under point into a new buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4395 If `auto-compression-mode' is enabled, compressed files like .gz and .bz2 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4396 are decompressed." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4397 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4398 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4399 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4400 (contents (and handle (mm-get-part handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4401 (base (and handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4402 (file-name-nondirectory |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4403 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4404 (mail-content-type-get (mm-handle-type handle) 'name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4405 (mail-content-type-get (mm-handle-disposition handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4406 'filename) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4407 "*decoded*")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4408 (buffer (and base (generate-new-buffer base)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4409 (when contents |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4410 (switch-to-buffer buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4411 (insert contents) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4412 ;; We do it this way to make `normal-mode' set the appropriate mode. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4413 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4414 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4415 (setq buffer-file-name (expand-file-name base)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4416 (gnus-mime-jka-compr-maybe-uncompress) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4417 (normal-mode)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4418 (setq buffer-file-name nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4419 (goto-char (point-min))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4420 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4421 (defun gnus-mime-print-part (&optional handle filename) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4422 "Print the MIME part under point." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4423 (interactive (list nil (ps-print-preprint current-prefix-arg))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4424 (gnus-article-check-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4425 (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4426 (contents (and handle (mm-get-part handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4427 (file (mm-make-temp-file (expand-file-name "mm." mm-tmp-directory))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4428 (printer (mailcap-mime-info (mm-handle-media-type handle) "print"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4429 (when contents |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4430 (if printer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4431 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4432 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4433 (mm-save-part-to-file handle file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4434 (call-process shell-file-name nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4435 (generate-new-buffer " *mm*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4436 nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4437 shell-command-switch |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4438 (mm-mailcap-command |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4439 printer file (mm-handle-type handle)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4440 (delete-file file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4441 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4442 (insert contents) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4443 (gnus-print-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4444 (ps-despool filename))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4445 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4446 (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
|
4447 "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
|
4448 (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
|
4449 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4450 (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
|
4451 contents charset |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4452 (b (point)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4453 (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4454 (when handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4455 (if (and (not arg) (mm-handle-undisplayer handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4456 (mm-remove-part handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4457 (setq contents (mm-get-part handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4458 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4459 ((not arg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4460 (setq charset (or (mail-content-type-get |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4461 (mm-handle-type handle) 'charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4462 gnus-newsgroup-charset))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4463 ((numberp arg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4464 (if (mm-handle-undisplayer handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4465 (mm-remove-part handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4466 (setq charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4467 (or (cdr (assq arg |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4468 gnus-summary-show-article-charset-alist)) |
59955
0b36e2f36bf5
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Miles Bader <miles@gnu.org>
parents:
59806
diff
changeset
|
4469 (mm-read-coding-system "Charset: ")))) |
0b36e2f36bf5
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Miles Bader <miles@gnu.org>
parents:
59806
diff
changeset
|
4470 (t |
0b36e2f36bf5
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Miles Bader <miles@gnu.org>
parents:
59806
diff
changeset
|
4471 (if (mm-handle-undisplayer handle) |
61537
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4472 (mm-remove-part handle)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4473 (forward-line 2) |
61537
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4474 (mm-insert-inline |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4475 handle |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4476 (if (and charset |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4477 (setq charset (mm-charset-to-coding-system |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4478 charset)) |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4479 (not (eq charset 'ascii))) |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4480 (mm-decode-coding-string contents charset) |
18b52f2ea5dc
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-256
Miles Bader <miles@gnu.org>
parents:
61487
diff
changeset
|
4481 (mm-string-to-multibyte contents))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4482 (goto-char b))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4483 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4484 (defun gnus-mime-view-part-as-charset (&optional handle arg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4485 "Insert the MIME part under point into the current buffer using the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4486 specified charset." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4487 (interactive (list nil current-prefix-arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4488 (gnus-article-check-buffer) |
69949
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4489 (let ((handle (or handle (get-text-property (point) 'gnus-data))) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4490 (fun (get-text-property (point) 'gnus-callback)) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4491 (gnus-newsgroup-ignored-charsets 'gnus-all) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4492 gnus-newsgroup-charset type charset) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4493 (when handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4494 (if (mm-handle-undisplayer handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4495 (mm-remove-part handle)) |
69949
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4496 (when fun |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4497 (setq gnus-newsgroup-charset |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4498 (or (cdr (assq arg gnus-summary-show-article-charset-alist)) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4499 (mm-read-coding-system "Charset: "))) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4500 ;; Strip the charset parameter from `handle'. |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4501 (setq type (mm-handle-type |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4502 (if (equal (mm-handle-media-type handle) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4503 "message/external-body") |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4504 (progn |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4505 (unless (mm-handle-cache handle) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4506 (mm-extern-cache-contents handle)) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4507 (mm-handle-cache handle)) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4508 handle)) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4509 charset (assq 'charset (cdr type))) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4510 (delq charset type) |
d0312c3f2374
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214
Miles Bader <miles@gnu.org>
parents:
69944
diff
changeset
|
4511 (funcall fun handle))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4512 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4513 (defun gnus-mime-view-part-externally (&optional handle) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4514 "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
|
4515 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4516 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4517 (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
|
4518 (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
|
4519 (mm-inlined-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4520 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4521 (mail-parse-ignored-charsets |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4522 (with-current-buffer gnus-summary-buffer |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4523 gnus-newsgroup-ignored-charsets)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4524 (type (mm-handle-media-type handle)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4525 (method (mailcap-mime-info type)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4526 (mm-enable-external t)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4527 (if (not (stringp method)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4528 (gnus-mime-view-part-as-type |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4529 nil (lambda (type) (stringp (mailcap-mime-info type)))) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4530 (when handle |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4531 (if (mm-handle-undisplayer handle) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4532 (mm-remove-part handle) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4533 (mm-display-part handle)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4534 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4535 (defun gnus-mime-view-part-internally (&optional handle) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4536 "View the MIME part under point with an internal viewer. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4537 If no internal viewer is available, use an external viewer." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4538 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4539 (gnus-article-check-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4540 (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
|
4541 (mm-inlined-types '(".*")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4542 (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
|
4543 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4544 (mail-parse-ignored-charsets |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4545 (with-current-buffer gnus-summary-buffer |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4546 gnus-newsgroup-ignored-charsets)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4547 (inhibit-read-only t)) |
70377
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4548 (if (not (mm-inlinable-p handle)) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4549 (gnus-mime-view-part-as-type |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4550 nil (lambda (type) (mm-inlinable-p handle type))) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4551 (when handle |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4552 (if (mm-handle-undisplayer handle) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4553 (mm-remove-part handle) |
1b78f3a87f16
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-265
Miles Bader <miles@gnu.org>
parents:
70044
diff
changeset
|
4554 (mm-display-part handle)))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4555 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4556 (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
|
4557 "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
|
4558 (interactive |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4559 (list (completing-read "Action: " gnus-mime-action-alist nil t))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4560 (gnus-article-check-buffer) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4561 (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
|
4562 (if action-pair |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4563 (funcall (cdr action-pair))))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4564 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4565 (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
|
4566 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4567 (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
|
4568 (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
|
4569 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4570 (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
|
4571 (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
|
4572 (funcall function handle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4573 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4574 (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
|
4575 "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
|
4576 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4577 (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
|
4578 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4579 (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
|
4580 "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
|
4581 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4582 (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
|
4583 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4584 (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
|
4585 "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
|
4586 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4587 (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
|
4588 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4589 (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
|
4590 "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
|
4591 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4592 (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
|
4593 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4594 (defun gnus-article-view-part-as-charset (n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4595 "View MIME part N using a specified charset. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4596 N is the numerical prefix." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4597 (interactive "p") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4598 (gnus-article-part-wrapper n 'gnus-mime-view-part-as-charset)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4599 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4600 (defun gnus-article-view-part-externally (n) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4601 "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
|
4602 (interactive "p") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4603 (gnus-article-part-wrapper n 'gnus-mime-view-part-externally)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4604 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4605 (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
|
4606 "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
|
4607 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4608 (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
|
4609 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4610 (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
|
4611 (if condition |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4612 (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
|
4613 (while (setq ihandle (pop alist)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4614 (if (and (cond |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4615 ((functionp condition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4616 (funcall condition (cdr ihandle))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4617 ((eq condition 'undisplayed) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4618 (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
|
4619 (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
|
4620 "multipart/alternative")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4621 ((eq condition 'undisplayed-alternative) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4622 (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
|
4623 (t t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4624 (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
|
4625 (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
|
4626 (setq n (car ihandle)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4627 (or n 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4628 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4629 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4630 (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
|
4631 "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
|
4632 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4633 (save-current-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4634 (set-buffer gnus-article-buffer) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4635 (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
|
4636 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
|
4637 (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
|
4638 (error "No such part")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4639 (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
|
4640 (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
|
4641 (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
|
4642 (gnus-article-press-button) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4643 (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
|
4644 (gnus-set-window-start))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4645 |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4646 (defsubst gnus-article-mime-total-parts () |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4647 (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
|
4648 1 ;; single part |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4649 (1- (length gnus-article-mime-handles)))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4650 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4651 (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
|
4652 "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
|
4653 (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
|
4654 (point (point)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4655 (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
|
4656 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4657 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4658 (let ((window (selected-window)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4659 (mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4660 (mail-parse-ignored-charsets |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4661 (if (gnus-buffer-live-p gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4662 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4663 (set-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4664 gnus-newsgroup-ignored-charsets) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4665 nil))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4666 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4667 (unwind-protect |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4668 (let ((win (gnus-get-buffer-window (current-buffer) t)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4669 (beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4670 (when win |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4671 (select-window win)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4672 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4673 (forward-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4674 (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
|
4675 ;; 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
|
4676 (mm-display-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4677 (save-restriction |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4678 (narrow-to-region (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4679 (if (eobp) (point) (1+ (point)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4680 (mm-display-part handle) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4681 ;; 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
|
4682 ;; 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
|
4683 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4684 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4685 (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
|
4686 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4687 nil id |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4688 (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
|
4689 (mm-handle-media-type handle))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4690 (if (window-live-p window) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4691 (select-window window))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4692 (goto-char point) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4693 (gnus-delete-line) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4694 (gnus-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4695 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
|
4696 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4697 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4698 (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
|
4699 "Go to MIME part N." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4700 (gnus-goto-char (text-property-any (point-min) (point-max) 'gnus-part n))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4701 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4702 (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
|
4703 (let ((gnus-tmp-name |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4704 (or (mail-content-type-get (mm-handle-type handle) 'name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4705 (mail-content-type-get (mm-handle-disposition handle) 'filename) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4706 (mail-content-type-get (mm-handle-type handle) 'url) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4707 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4708 (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
|
4709 (gnus-tmp-description |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4710 (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
|
4711 ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4712 (gnus-tmp-dots |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4713 (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
|
4714 (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
|
4715 "" "...")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4716 (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
|
4717 (buffer-size))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4718 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
|
4719 (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
|
4720 (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
|
4721 (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
|
4722 (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
|
4723 (concat "; " gnus-tmp-name)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4724 (unless (equal gnus-tmp-description "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4725 (setq gnus-tmp-type-long (concat " --- " gnus-tmp-type-long))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4726 (unless (bolp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4727 (insert "\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4728 (setq b (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4729 (gnus-eval-format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4730 gnus-mime-button-line-format gnus-mime-button-line-format-alist |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4731 `(,@(gnus-local-map-property gnus-mime-button-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4732 gnus-callback gnus-mm-display-part |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4733 gnus-part ,gnus-tmp-id |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4734 article-type annotation |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4735 gnus-data ,handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4736 (setq e (if (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4737 ;; Exclude a newline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4738 (1- (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4739 (point))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4740 (widget-convert-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4741 'link b e |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4742 :mime-handle handle |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4743 :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
|
4744 :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
|
4745 :help-echo |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4746 (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
|
4747 ;; 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
|
4748 ;; wid-edit (XEmacs only). |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4749 (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
|
4750 (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
|
4751 (format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4752 "%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
|
4753 (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
|
4754 ;; 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
|
4755 ;; window, overlay, position. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4756 (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
|
4757 (if overlay |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4758 (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
|
4759 (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
|
4760 :mime-handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4761 (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
|
4762 "hide" "show") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4763 (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
|
4764 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4765 (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
|
4766 (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
|
4767 (gnus-article-press-button)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4768 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4769 (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
|
4770 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4771 (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
|
4772 "Display the MIME parts." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4773 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4774 (save-selected-window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4775 (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
|
4776 (point (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4777 (when window |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4778 (select-window window) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4779 ;; 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
|
4780 ;; 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
|
4781 (set-window-point window point))) |
68207
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4782 (let ((handles ihandles) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4783 (inhibit-read-only t) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4784 handle) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4785 (cond (handles) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4786 ((setq handles (mm-dissect-buffer nil gnus-article-loose-mime)) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4787 (when gnus-article-emulate-mime |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4788 (mm-uu-dissect-text-parts handles))) |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4789 (gnus-article-emulate-mime |
fbd379b34f0a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-698
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4790 (setq handles (mm-uu-dissect)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4791 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4792 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4793 ;; 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
|
4794 (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
|
4795 (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
|
4796 (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
|
4797 (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
|
4798 ;; 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
|
4799 (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
|
4800 (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
|
4801 (if (and handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4802 (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
|
4803 (cdr handles))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4804 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4805 (when (and (not ihandles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4806 (not gnus-displaying-mime)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4807 ;; 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
|
4808 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4809 (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
|
4810 (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
|
4811 (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
|
4812 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4813 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4814 (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
|
4815 (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
|
4816 (widen))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4817 (unless ihandles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4818 ;; Highlight the headers. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4819 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4820 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4821 (article-goto-body) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4822 (narrow-to-region (point-min) (point)) |
62099
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
4823 (gnus-article-save-original-date |
d1245d218964
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291
Miles Bader <miles@gnu.org>
parents:
61537
diff
changeset
|
4824 (gnus-treat-article 'head))))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4825 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4826 (defcustom gnus-mime-display-multipart-as-mixed nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4827 "Display \"multipart\" parts as \"multipart/mixed\". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4828 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4829 If t, it overrides nil values of |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4830 `gnus-mime-display-multipart-alternative-as-mixed' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4831 `gnus-mime-display-multipart-related-as-mixed'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4832 :group 'gnus-article-mime |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4833 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4834 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4835 (defcustom gnus-mime-display-multipart-alternative-as-mixed nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4836 "Display \"multipart/alternative\" parts as \"multipart/mixed\"." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
4837 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4838 :group 'gnus-article-mime |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4839 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4840 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4841 (defcustom gnus-mime-display-multipart-related-as-mixed nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4842 "Display \"multipart/related\" parts as \"multipart/mixed\". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4843 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4844 If displaying \"text/html\" is discouraged \(see |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4845 `mm-discouraged-alternatives'\) images or other material inside a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4846 \"multipart/related\" part might be overlooked when this variable is nil." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
4847 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4848 :group 'gnus-article-mime |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4849 :type 'boolean) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4850 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4851 (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
|
4852 (cond |
65616
cabd12ecc31c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553
Miles Bader <miles@gnu.org>
parents:
65388
diff
changeset
|
4853 ;; Maybe a broken MIME message. |
cabd12ecc31c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553
Miles Bader <miles@gnu.org>
parents:
65388
diff
changeset
|
4854 ((null handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4855 ;; Single part. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4856 ((not (stringp (car handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4857 (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
|
4858 ;; User-defined multipart |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4859 ((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
|
4860 (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
|
4861 handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4862 ;; multipart/alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4863 ((and (equal (car handle) "multipart/alternative") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4864 (not (or gnus-mime-display-multipart-as-mixed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4865 gnus-mime-display-multipart-alternative-as-mixed))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4866 (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
|
4867 (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
|
4868 (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
|
4869 ;; multipart/related |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4870 ((and (equal (car handle) "multipart/related") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4871 (not (or gnus-mime-display-multipart-as-mixed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4872 gnus-mime-display-multipart-related-as-mixed))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4873 ;;;!!!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
|
4874 ;;;!!!to the first part. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4875 ;;(gnus-mime-display-part (cadr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4876 ;;;!!! Most multipart/related is an HTML message plus images. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4877 ;;;!!! Unfortunately we are unable to let W3 display those |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4878 ;;;!!! included images, so we just display it as a mixed multipart. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4879 ;;(gnus-mime-display-mixed (cdr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4880 ;;;!!! No, w3 can display everything just fine. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4881 (gnus-mime-display-part (cadr handle))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4882 ((equal (car handle) "multipart/signed") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4883 (gnus-add-wash-type 'signed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4884 (gnus-mime-display-security handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4885 ((equal (car handle) "multipart/encrypted") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4886 (gnus-add-wash-type 'encrypted) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4887 (gnus-mime-display-security handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4888 ;; 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
|
4889 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4890 (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
|
4891 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4892 (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
|
4893 (if (stringp (car handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4894 (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
|
4895 (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
|
4896 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4897 (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
|
4898 (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
|
4899 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4900 (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
|
4901 (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
|
4902 (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
|
4903 (not-attachment t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4904 (move nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4905 display text) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4906 (catch 'ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4907 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4908 (while ignored |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4909 (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
|
4910 (throw 'ignored nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4911 (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
|
4912 (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
|
4913 (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
|
4914 (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
|
4915 "inline") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4916 (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
|
4917 (mm-automatic-display-p handle) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4918 (or (and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4919 (mm-inlinable-p handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4920 (mm-inlined-p handle)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4921 (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
|
4922 (setq display t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4923 (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
|
4924 (setq text t))) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4925 (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
|
4926 beg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4927 (push (cons id handle) gnus-article-mime-handle-alist) |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4928 (when (and display |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4929 (equal (mm-handle-media-supertype handle) "message")) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4930 (insert-char |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4931 ?\n |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4932 (cond ((not (bolp)) 2) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4933 ((or (bobp) (eq (char-before (1- (point))) ?\n)) 0) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
4934 (t 1)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4935 (when (or (not display) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4936 (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
|
4937 (gnus-insert-mime-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4938 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
|
4939 (gnus-article-insert-newline) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4940 ;; Remember modify the number of forward lines. |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4941 (setq move t)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4942 (setq beg (point)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4943 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4944 (display |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4945 (when move |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4946 (forward-line -1) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4947 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4948 (let ((mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4949 (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
|
4950 (save-excursion (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4951 (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
|
4952 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4953 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4954 (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
|
4955 (goto-char (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4956 ((and text not-attachment) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4957 (when move |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4958 (forward-line -1) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4959 (setq beg (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4960 (gnus-article-insert-newline) |
65719
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4961 (mm-insert-inline |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4962 handle |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4963 (let ((charset (mail-content-type-get (mm-handle-type handle) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4964 'charset))) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4965 (cond ((not charset) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4966 (mm-string-as-multibyte (mm-get-part handle))) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4967 ((eq charset 'gnus-decoded) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4968 (with-current-buffer (mm-handle-buffer handle) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4969 (buffer-string))) |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4970 (t |
5265a4059126
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Miles Bader <miles@gnu.org>
parents:
65682
diff
changeset
|
4971 (mm-decode-string (mm-get-part handle) charset))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4972 (goto-char (point-max)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4973 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4974 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4975 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4976 (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
|
4977 (gnus-treat-article |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
4978 nil id |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
4979 (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
|
4980 (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
|
4981 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4982 (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
|
4983 "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
|
4984 (unless gnus-inhibit-mime-unbuttonizing |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4985 (when (catch 'found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4986 (let ((types gnus-unbuttonized-mime-types)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4987 (while types |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4988 (when (string-match (pop types) type) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4989 (throw 'found t))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4990 (not (catch 'found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4991 (let ((types gnus-buttonized-mime-types)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4992 (while types |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4993 (when (string-match (pop types) type) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
4994 (throw 'found t))))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4995 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4996 (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
|
4997 "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
|
4998 (gnus-put-text-property |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
4999 (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
|
5000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5001 (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
|
5002 (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
|
5003 (ihandles handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5004 (point (point)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5005 handle (inhibit-read-only t) from props begend not-pref) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5006 (save-window-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5007 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5008 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5009 (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
|
5010 (or (cdr ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5011 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5012 (goto-char (car ibegend)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5013 (forward-line 2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5014 (point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5015 (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
|
5016 (mm-remove-parts handles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5017 (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
|
5018 ;; Do the toggle. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5019 (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
|
5020 (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
|
5021 (when (or ibegend |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5022 (not preferred) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5023 (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
|
5024 "multipart/alternative"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5025 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5026 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5027 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5028 (insert (format "%d. " id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5029 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5030 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5031 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5032 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5033 (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
|
5034 ',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
|
5035 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5036 ',ihandles ',not-pref ',begend ,id)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5037 ,@(gnus-local-map-property 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
|
5038 ,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
|
5039 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
|
5040 gnus-part ,id |
68129
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
5041 article-type multipart)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5042 (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
|
5043 :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
|
5044 :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
|
5045 ;; Do the handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5046 (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
|
5047 (gnus-add-text-properties |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5048 (setq from (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5049 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5050 (insert (format "(%c) %-18s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5051 (if (equal handle preferred) ?* ? ) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5052 (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
|
5053 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5054 `(gnus-callback |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5055 (lambda (handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5056 (unless ,(not ibegend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5057 (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
|
5058 ',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
|
5059 (gnus-mime-display-alternative |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5060 ',ihandles ',handle ',begend ,id)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5061 ,@(gnus-local-map-property 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
|
5062 ,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
|
5063 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
|
5064 gnus-part ,id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5065 gnus-data ,handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5066 (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
|
5067 :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
|
5068 :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
|
5069 (insert " ")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5070 (insert "\n\n")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5071 (when preferred |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5072 (if (stringp (car preferred)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5073 (gnus-display-mime preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5074 (let ((mail-parse-charset gnus-newsgroup-charset) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
5075 (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
|
5076 (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
|
5077 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5078 (mm-display-part preferred) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5079 ;; Do highlighting. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5080 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5081 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5082 (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
|
5083 (gnus-treat-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5084 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
|
5085 (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
|
5086 (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
|
5087 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5088 (setcdr begend (point-marker))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5089 (when ibegend |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5090 (goto-char point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5091 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5092 (defconst gnus-article-wash-status-strings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5093 (let ((alist '((cite "c" "Possible hidden citation text" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5094 " " "All citation text visible") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5095 (headers "h" "Hidden headers" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5096 " " "All headers visible.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5097 (pgp "p" "Encrypted or signed message status hidden" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5098 " " "No hidden encryption nor digital signature status") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5099 (signature "s" "Signature has been hidden" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5100 " " "Signature is visible") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5101 (overstrike "o" "Overstrike (^H) characters applied" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5102 " " "No overstrike characters applied") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5103 (emphasis "e" "/*_Emphasis_*/ characters applied" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5104 " " "No /*_emphasis_*/ characters applied"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5105 result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5106 (dolist (entry alist result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5107 (let ((key (nth 0 entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5108 (on (copy-sequence (nth 1 entry))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5109 (on-help (nth 2 entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5110 (off (copy-sequence (nth 3 entry))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5111 (off-help (nth 4 entry))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5112 (put-text-property 0 1 'help-echo on-help on) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5113 (put-text-property 0 1 'help-echo off-help off) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5114 (push (list key on off) result)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5115 "Alist of strings describing wash status in the mode line. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5116 Each entry has the form (KEY ON OF), where the KEY is a symbol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5117 representing the particular washing function, ON is the string to use |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5118 in the article mode line when the washing function is active, and OFF |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5119 is the string to use when it is inactive.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5120 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5121 (defun gnus-article-wash-status-entry (key value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5122 (let ((entry (assoc key gnus-article-wash-status-strings))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5123 (if value (nth 1 entry) (nth 2 entry)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5124 |
17493 | 5125 (defun gnus-article-wash-status () |
5126 "Return a string which display status of article washing." | |
5127 (save-excursion | |
5128 (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
|
5129 (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
|
5130 (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
|
5131 (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
|
5132 (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
|
5133 (pem (memq 'pem gnus-article-wash-types)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5134 (signed (memq 'signed gnus-article-wash-types)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5135 (encrypted (memq 'encrypted gnus-article-wash-types)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5136 (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
|
5137 (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
|
5138 (emphasis (memq 'emphasis gnus-article-wash-types))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5139 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5140 (gnus-article-wash-status-entry 'cite cite) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5141 (gnus-article-wash-status-entry 'headers (or headers boring)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5142 (gnus-article-wash-status-entry 'pgp (or pgp pem signed encrypted)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5143 (gnus-article-wash-status-entry 'signature signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5144 (gnus-article-wash-status-entry 'overstrike overstrike) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5145 (gnus-article-wash-status-entry 'emphasis emphasis))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5146 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5147 (defun gnus-add-wash-type (type) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5148 "Add a washing of TYPE to the current status." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5149 (add-to-list 'gnus-article-wash-types type)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5150 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5151 (defun gnus-delete-wash-type (type) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5152 "Add a washing of TYPE to the current status." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5153 (setq gnus-article-wash-types (delq type gnus-article-wash-types))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5154 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5155 (defun gnus-add-image (category image) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5156 "Add IMAGE of CATEGORY to the list of displayed images." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5157 (let ((entry (assq category gnus-article-image-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5158 (unless entry |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5159 (setq entry (list category)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5160 (push entry gnus-article-image-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5161 (nconc entry (list image)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5162 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5163 (defun gnus-delete-images (category) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5164 "Delete all images in CATEGORY." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5165 (let ((entry (assq category gnus-article-image-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5166 (dolist (image (cdr entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5167 (gnus-remove-image image category)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5168 (setq gnus-article-image-alist (delq entry gnus-article-image-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5169 (gnus-delete-wash-type category))) |
17493 | 5170 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5171 (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
|
5172 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5173 (defun gnus-article-maybe-hide-headers () |
17493 | 5174 "Hide unwanted headers if `gnus-have-all-headers' is nil. |
5175 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
|
5176 (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
|
5177 (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
|
5178 gnus-have-all-headers))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5179 (not gnus-inhibit-hiding)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5180 (gnus-article-hide-headers))) |
17493 | 5181 |
5182 ;;; Article savers. | |
5183 | |
5184 (defun gnus-output-to-file (file-name) | |
5185 "Append the current article to a file named FILE-NAME." | |
5186 (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
|
5187 (with-temp-buffer |
17493 | 5188 (insert-buffer-substring artbuf) |
5189 ;; Append newline at end of the buffer as separator, and then | |
5190 ;; save it to file. | |
5191 (goto-char (point-max)) | |
5192 (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
|
5193 (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
|
5194 (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
|
5195 t))) |
17493 | 5196 |
5197 (defun gnus-narrow-to-page (&optional arg) | |
5198 "Narrow the article buffer to a page. | |
5199 If given a numerical ARG, move forward ARG pages." | |
5200 (interactive "P") | |
5201 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
5202 (save-excursion | |
5203 (set-buffer gnus-article-buffer) | |
5204 (goto-char (point-min)) | |
5205 (widen) | |
5206 ;; Remove any old next/prev buttons. | |
5207 (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
|
5208 (let ((inhibit-read-only t)) |
17493 | 5209 (gnus-remove-text-with-property 'gnus-prev) |
5210 (gnus-remove-text-with-property 'gnus-next))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5211 (if |
17493 | 5212 (cond ((< arg 0) |
5213 (re-search-backward page-delimiter nil 'move (1+ (abs arg)))) | |
5214 ((> arg 0) | |
5215 (re-search-forward page-delimiter nil 'move arg))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5216 (goto-char (match-end 0)) |
17493 | 5217 (save-excursion |
5218 (goto-char (point-min)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5219 (setq gnus-page-broken |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5220 (and (re-search-forward page-delimiter nil t) t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5221 (when gnus-page-broken |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5222 (narrow-to-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5223 (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5224 (if (re-search-forward page-delimiter nil 'move) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5225 (match-beginning 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5226 (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5227 (when (and (gnus-visual-p 'page-marker) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5228 (> (point-min) (save-restriction (widen) (point-min)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5229 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5230 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5231 (gnus-insert-prev-page-button))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5232 (when (and (gnus-visual-p 'page-marker) |
58857
3e162bf0db79
(gnus-narrow-to-page): Don't hardcode point-min.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58835
diff
changeset
|
5233 (< (point-max) (save-restriction (widen) (point-max)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5234 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5235 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5236 (gnus-insert-next-page-button)))))) |
17493 | 5237 |
5238 ;; Article mode commands | |
5239 | |
5240 (defun gnus-article-goto-next-page () | |
5241 "Show the next page of the article." | |
5242 (interactive) | |
5243 (when (gnus-article-next-page) | |
5244 (goto-char (point-min)) | |
5245 (gnus-article-read-summary-keys nil (gnus-character-to-event ?n)))) | |
5246 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5247 |
17493 | 5248 (defun gnus-article-goto-prev-page () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5249 "Show the previous page of the article." |
17493 | 5250 (interactive) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5251 (if (bobp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5252 (gnus-article-read-summary-keys nil (gnus-character-to-event ?p)) |
17493 | 5253 (gnus-article-prev-page nil))) |
5254 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5255 ;; This is cleaner but currently breaks `gnus-pick-mode': |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5256 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5257 ;; (defun gnus-article-goto-next-page () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5258 ;; "Show the next page of the article." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5259 ;; (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5260 ;; (gnus-eval-in-buffer-window gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5261 ;; (gnus-summary-next-page))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5262 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5263 ;; (defun gnus-article-goto-prev-page () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5264 ;; "Show the next page of the article." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5265 ;; (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5266 ;; (gnus-eval-in-buffer-window gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5267 ;; (gnus-summary-prev-page))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5268 |
17493 | 5269 (defun gnus-article-next-page (&optional lines) |
5270 "Show the next page of the current article. | |
5271 If end of article, return non-nil. Otherwise return nil. | |
5272 Argument LINES specifies lines to be scrolled up." | |
5273 (interactive "p") | |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5274 (move-to-window-line -1) |
17493 | 5275 (if (save-excursion |
5276 (end-of-line) | |
5277 (and (pos-visible-in-window-p) ;Not continuation line. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5278 (>= (1+ (point)) (point-max)))) ;Allow for trailing newline. |
17493 | 5279 ;; Nothing in this page. |
5280 (if (or (not gnus-page-broken) | |
5281 (save-excursion | |
5282 (save-restriction | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5283 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5284 (forward-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5285 (eobp)))) ;Real end-of-buffer? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5286 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5287 (when gnus-article-over-scroll |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5288 (gnus-article-next-page-1 lines)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5289 t) ;Nothing more. |
17493 | 5290 (gnus-narrow-to-page 1) ;Go to next page. |
5291 nil) | |
5292 ;; More in this page. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5293 (gnus-article-next-page-1 lines) |
17493 | 5294 nil)) |
5295 | |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5296 (defmacro gnus-article-beginning-of-window () |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5297 "Move point to the beginning of the window. |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5298 In Emacs, the point is placed at the line number which `scroll-margin' |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5299 specifies." |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5300 (if (featurep 'xemacs) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5301 '(move-to-window-line 0) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5302 '(move-to-window-line |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5303 (min (max 0 scroll-margin) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5304 (max 1 (- (window-height) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5305 (if mode-line-format 1 0) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5306 (if (and (boundp 'header-line-format) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5307 (symbol-value 'header-line-format)) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5308 1 0))))))) |
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5309 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5310 (defun gnus-article-next-page-1 (lines) |
64693
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5311 (when (and (not (featurep 'xemacs)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5312 (numberp lines) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5313 (> lines 0) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5314 (numberp (symbol-value 'scroll-margin)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5315 (> (symbol-value 'scroll-margin) 0)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5316 ;; Protect against the bug that Emacs 21.x hangs up when scrolling up for |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5317 ;; too many number of lines if `scroll-margin' is set as two or greater. |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5318 (setq lines (min lines |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5319 (max 0 (- (count-lines (window-start) (point-max)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5320 (symbol-value 'scroll-margin)))))) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5321 (condition-case () |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5322 (let ((scroll-in-place nil)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5323 (scroll-up lines)) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5324 (end-of-buffer |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5325 ;; Long lines may cause an end-of-buffer error. |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5326 (goto-char (point-max)))) |
6bf3cc5c6ab3
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Miles Bader <miles@gnu.org>
parents:
64643
diff
changeset
|
5327 (gnus-article-beginning-of-window)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5328 |
17493 | 5329 (defun gnus-article-prev-page (&optional lines) |
5330 "Show previous page of current article. | |
5331 Argument LINES specifies lines to be scrolled down." | |
5332 (interactive "p") | |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5333 (move-to-window-line 0) |
17493 | 5334 (if (and gnus-page-broken |
5335 (bobp) | |
5336 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
5337 (progn | |
5338 (gnus-narrow-to-page -1) ;Go to previous page. | |
5339 (goto-char (point-max)) | |
5340 (recenter -1)) | |
64643
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5341 (prog1 |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5342 (condition-case () |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5343 (let ((scroll-in-place nil)) |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5344 (scroll-down lines)) |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5345 (beginning-of-buffer |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5346 (goto-char (point-min)))) |
5ecf32f96408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Miles Bader <miles@gnu.org>
parents:
64631
diff
changeset
|
5347 (gnus-article-beginning-of-window)))) |
17493 | 5348 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5349 (defun gnus-article-only-boring-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5350 "Decide whether there is only boring text remaining in the article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5351 Something \"interesting\" is a word of at least two letters that does |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5352 not have a face in `gnus-article-boring-faces'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5353 (when (and gnus-article-skip-boring |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5354 (boundp 'gnus-article-boring-faces) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5355 (symbol-value 'gnus-article-boring-faces)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5356 (save-excursion |
69572
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5357 (let ((inhibit-point-motion-hooks t)) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5358 (catch 'only-boring |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5359 (while (re-search-forward "\\b\\w\\w" nil t) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5360 (forward-char -1) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5361 (when (not (gnus-intersection |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5362 (gnus-faces-at (point)) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5363 (symbol-value 'gnus-article-boring-faces))) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5364 (throw 'only-boring nil))) |
b4faac2800dd
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-163
Miles Bader <miles@gnu.org>
parents:
68944
diff
changeset
|
5365 (throw 'only-boring t)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5366 |
17493 | 5367 (defun gnus-article-refer-article () |
5368 "Read article specified by message-id around point." | |
5369 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5370 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5371 (re-search-backward "[ \t]\\|^" (gnus-point-at-bol) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5372 (re-search-forward "<?news:<?\\|<" (gnus-point-at-eol) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5373 (if (re-search-forward "[^@ ]+@[^ \t>]+" (gnus-point-at-eol) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5374 (let ((msg-id (concat "<" (match-string 0) ">"))) |
17493 | 5375 (set-buffer gnus-summary-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5376 (gnus-summary-refer-article msg-id)) |
17493 | 5377 (error "No references around point")))) |
5378 | |
5379 (defun gnus-article-show-summary () | |
5380 "Reconfigure windows to show summary buffer." | |
5381 (interactive) | |
5382 (if (not (gnus-buffer-live-p gnus-summary-buffer)) | |
5383 (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
|
5384 (gnus-article-set-globals) |
17493 | 5385 (gnus-configure-windows 'article) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5386 (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
|
5387 (gnus-summary-position-point))) |
17493 | 5388 |
5389 (defun gnus-article-describe-briefly () | |
5390 "Describe article mode commands briefly." | |
5391 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5392 (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 | 5393 |
5394 (defun gnus-article-summary-command () | |
5395 "Execute the last keystroke in the summary buffer." | |
5396 (interactive) | |
5397 (let ((obuf (current-buffer)) | |
5398 (owin (current-window-configuration)) | |
5399 func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5400 (switch-to-buffer gnus-article-current-summary 'norecord) |
17493 | 5401 (setq func (lookup-key (current-local-map) (this-command-keys))) |
5402 (call-interactively func) | |
5403 (set-buffer obuf) | |
5404 (set-window-configuration owin) | |
5405 (set-window-point (get-buffer-window (current-buffer)) (point)))) | |
5406 | |
5407 (defun gnus-article-summary-command-nosave () | |
5408 "Execute the last keystroke in the summary buffer." | |
5409 (interactive) | |
5410 (let (func) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5411 (pop-to-buffer gnus-article-current-summary 'norecord) |
17493 | 5412 (setq func (lookup-key (current-local-map) (this-command-keys))) |
5413 (call-interactively func))) | |
5414 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5415 (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
|
5416 "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
|
5417 (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
|
5418 (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
|
5419 |
17493 | 5420 (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) |
5421 "Read a summary buffer key sequence and execute it from the article buffer." | |
5422 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5423 (gnus-article-check-buffer) |
17493 | 5424 (let ((nosaves |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5425 '("q" "Q" "c" "r" "\C-c\C-f" "m" "a" "f" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5426 "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5427 "=" "^" "\M-^" "|")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5428 (nosave-but-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5429 '("A\r")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5430 (nosave-in-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5431 '("\C-d")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5432 (up-to-top |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5433 '("n" "Gn" "p" "Gp")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5434 keys new-sum-point) |
17493 | 5435 (save-excursion |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5436 (set-buffer gnus-article-current-summary) |
17493 | 5437 (let (gnus-pick-mode) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5438 (push (or key last-command-event) unread-command-events) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5439 (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
|
5440 (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
|
5441 (read-key-sequence nil))))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
5442 |
17493 | 5443 (message "") |
5444 | |
5445 (if (or (member keys nosaves) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5446 (member keys nosave-but-article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5447 (member keys nosave-in-article)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5448 (let (func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5449 (save-window-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5450 (pop-to-buffer gnus-article-current-summary 'norecord) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5451 ;; We disable the pick minor mode commands. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5452 (let (gnus-pick-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5453 (setq func (lookup-key (current-local-map) keys)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5454 (if (or (not func) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5455 (numberp func)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5456 (ding) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5457 (unless (member keys nosave-in-article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5458 (set-buffer gnus-article-current-summary)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5459 (call-interactively func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5460 (setq new-sum-point (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5461 (when (member keys nosave-but-article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5462 (pop-to-buffer gnus-article-buffer 'norecord))) |
17493 | 5463 ;; These commands should restore window configuration. |
5464 (let ((obuf (current-buffer)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5465 (owin (current-window-configuration)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5466 (opoint (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5467 win func in-buffer selected new-sum-start new-sum-hscroll) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5468 (cond (not-restore-window |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5469 (pop-to-buffer gnus-article-current-summary 'norecord)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5470 ((setq win (get-buffer-window gnus-article-current-summary)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5471 (select-window win)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5472 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5473 (switch-to-buffer gnus-article-current-summary 'norecord))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5474 (setq in-buffer (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5475 ;; We disable the pick minor mode commands. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5476 (if (and (setq func (let (gnus-pick-mode) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5477 (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
|
5478 (functionp func)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5479 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5480 (call-interactively func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5481 (when (eq win (selected-window)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5482 (setq new-sum-point (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5483 new-sum-start (window-start win) |
61487
f5e70b5f16ce
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-248
Miles Bader <miles@gnu.org>
parents:
61304
diff
changeset
|
5484 new-sum-hscroll (window-hscroll win))) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5485 (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
|
5486 (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
|
5487 (set-buffer obuf) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5488 (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
|
5489 (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
|
5490 (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
|
5491 (article-goto-body) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5492 (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
|
5493 1) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5494 (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
|
5495 (point))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5496 (when (and (not not-restore-window) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5497 new-sum-point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5498 (set-window-point win new-sum-point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5499 (set-window-start win new-sum-start) |
61487
f5e70b5f16ce
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-248
Miles Bader <miles@gnu.org>
parents:
61304
diff
changeset
|
5500 (set-window-hscroll win new-sum-hscroll)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5501 (set-window-configuration owin) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5502 (ding)))))) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5503 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5504 (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
|
5505 "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
|
5506 (interactive "kDescribe key: ") |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5507 (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
|
5508 (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
|
5509 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5510 (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
|
5511 (let (gnus-pick-mode) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5512 (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5513 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5514 (push (elt key 0) unread-command-events) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5515 (setq key (events-to-keys |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5516 (read-key-sequence "Describe key: ")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5517 (setq unread-command-events |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5518 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5519 (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5520 (string-to-list key))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5521 (setq key (read-key-sequence "Describe key: ")))) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5522 (describe-key key)) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5523 (describe-key key))) |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5524 |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5525 (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
|
5526 "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
|
5527 (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
|
5528 (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
|
5529 (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
|
5530 (save-excursion |
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5531 (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
|
5532 (let (gnus-pick-mode) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5533 (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5534 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5535 (push (elt key 0) unread-command-events) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5536 (setq key (events-to-keys |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5537 (read-key-sequence "Describe key: ")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5538 (setq unread-command-events |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5539 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5540 (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5541 (string-to-list key))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5542 (setq key (read-key-sequence "Describe key: ")))) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
5543 (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
|
5544 (describe-key-briefly key insert))) |
17493 | 5545 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5546 (defun gnus-article-reply-with-original (&optional wide) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5547 "Start composing a reply mail to the current message. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5548 The text in the region will be yanked. If the region isn't active, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5549 the entire article will be yanked." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5550 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5551 (let ((article (cdr gnus-article-current)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5552 contents) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5553 (if (not (gnus-mark-active-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5554 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5555 (gnus-summary-reply (list (list article)) wide)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5556 (setq contents (buffer-substring (point) (mark t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5557 ;; Deactivate active regions. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5558 (when (and (boundp 'transient-mark-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5559 transient-mark-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5560 (setq mark-active nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5561 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5562 (gnus-summary-reply |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5563 (list (list article contents)) wide))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5564 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5565 (defun gnus-article-followup-with-original () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5566 "Compose a followup to the current article. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5567 The text in the region will be yanked. If the region isn't active, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5568 the entire article will be yanked." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5569 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5570 (let ((article (cdr gnus-article-current)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5571 contents) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5572 (if (not (gnus-mark-active-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5573 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5574 (gnus-summary-followup (list (list article)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5575 (setq contents (buffer-substring (point) (mark t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5576 ;; Deactivate active regions. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5577 (when (and (boundp 'transient-mark-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5578 transient-mark-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5579 (setq mark-active nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5580 (with-current-buffer gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5581 (gnus-summary-followup |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5582 (list (list article contents))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5583 |
17493 | 5584 (defun gnus-article-hide (&optional arg force) |
5585 "Hide all the gruft in the current article. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5586 This means that signatures, cited text and (some) headers will be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5587 hidden. |
17493 | 5588 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
|
5589 (interactive (append (gnus-article-hidden-arg) (list 'force))) |
17493 | 5590 (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
|
5591 (gnus-article-hide-list-identifiers arg) |
17493 | 5592 (gnus-article-hide-citation-maybe arg force) |
5593 (gnus-article-hide-signature arg)) | |
5594 | |
5595 (defun gnus-article-maybe-highlight () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5596 "Do some article highlighting if article highlighting is requested." |
17493 | 5597 (when (gnus-visual-p 'article-highlight 'highlight) |
5598 (gnus-article-highlight-some))) | |
5599 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5600 (defun gnus-check-group-server () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5601 ;; 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
|
5602 (unless (gnus-server-opened |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5603 (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
|
5604 (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
|
5605 (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
|
5606 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5607 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5608 (autoload 'nneething-get-file-name "nneething")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5609 |
17493 | 5610 (defun gnus-request-article-this-buffer (article group) |
5611 "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
|
5612 (let (do-update-line sparse-header) |
17493 | 5613 (prog1 |
5614 (save-excursion | |
5615 (erase-buffer) | |
5616 (gnus-kill-all-overlays) | |
5617 (setq group (or group gnus-newsgroup-name)) | |
5618 | |
5619 ;; Using `gnus-request-article' directly will insert the article into | |
5620 ;; `nntp-server-buffer' - so we'll save some time by not having to | |
5621 ;; copy it from the server buffer into the article buffer. | |
5622 | |
5623 ;; We only request an article by message-id when we do not have the | |
5624 ;; headers for it, so we'll have to get those. | |
5625 (when (stringp article) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5626 (gnus-read-header article)) |
17493 | 5627 |
5628 ;; If the article number is negative, that means that this article | |
5629 ;; doesn't belong in this newsgroup (possibly), so we find its | |
5630 ;; message-id and request it by id instead of number. | |
5631 (when (and (numberp article) | |
5632 gnus-summary-buffer | |
5633 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5634 (gnus-buffer-exists-p gnus-summary-buffer)) |
17493 | 5635 (save-excursion |
5636 (set-buffer gnus-summary-buffer) | |
5637 (let ((header (gnus-summary-article-header article))) | |
5638 (when (< article 0) | |
5639 (cond | |
5640 ((memq article gnus-newsgroup-sparse) | |
5641 ;; This is a sparse gap article. | |
5642 (setq do-update-line article) | |
5643 (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
|
5644 (setq sparse-header (gnus-read-header article)) |
17493 | 5645 (setq gnus-newsgroup-sparse |
5646 (delq article gnus-newsgroup-sparse))) | |
5647 ((vectorp header) | |
5648 ;; It's a real article. | |
5649 (setq article (mail-header-id header))) | |
5650 (t | |
5651 ;; It is an extracted pseudo-article. | |
5652 (setq article 'pseudo) | |
5653 (gnus-request-pseudo-article header)))) | |
5654 | |
5655 (let ((method (gnus-find-method-for-group | |
5656 gnus-newsgroup-name))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5657 (when (and (eq (car method) 'nneething) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5658 (vectorp header)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5659 (let ((dir (nneething-get-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5660 (mail-header-id header)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5661 (when (and (stringp dir) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5662 (file-directory-p dir)) |
17493 | 5663 (setq article 'nneething) |
5664 (gnus-group-enter-directory dir)))))))) | |
5665 | |
5666 (cond | |
5667 ;; Refuse to select canceled articles. | |
5668 ((and (numberp article) | |
5669 gnus-summary-buffer | |
5670 (get-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5671 (gnus-buffer-exists-p gnus-summary-buffer) |
17493 | 5672 (eq (cdr (save-excursion |
5673 (set-buffer gnus-summary-buffer) | |
5674 (assq article gnus-newsgroup-reads))) | |
5675 gnus-canceled-mark)) | |
5676 nil) | |
5677 ;; We first check `gnus-original-article-buffer'. | |
5678 ((and (get-buffer gnus-original-article-buffer) | |
5679 (numberp article) | |
5680 (save-excursion | |
5681 (set-buffer gnus-original-article-buffer) | |
5682 (and (equal (car gnus-original-article) group) | |
5683 (eq (cdr gnus-original-article) article)))) | |
5684 (insert-buffer-substring gnus-original-article-buffer) | |
5685 'article) | |
5686 ;; Check the backlog. | |
5687 ((and gnus-keep-backlog | |
5688 (gnus-backlog-request-article group article (current-buffer))) | |
5689 'article) | |
5690 ;; Check asynchronous pre-fetch. | |
5691 ((gnus-async-request-fetched-article group article (current-buffer)) | |
5692 (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
|
5693 (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
|
5694 (gnus-backlog-enter-article group article (current-buffer))) |
17493 | 5695 'article) |
5696 ;; Check the cache. | |
5697 ((and gnus-use-cache | |
5698 (numberp article) | |
5699 (gnus-cache-request-article article group)) | |
5700 'article) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5701 ;; Check the agent cache. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5702 ((gnus-agent-request-article article group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5703 'article) |
17493 | 5704 ;; 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
|
5705 ((or (stringp article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5706 (numberp article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5707 (let ((gnus-override-method gnus-override-method) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
5708 (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
|
5709 gnus-refer-article-method)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5710 (backend (car (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5711 gnus-newsgroup-name))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5712 result |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
5713 (inhibit-read-only t)) |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
5714 (if (or (not (listp methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
5715 (and (symbolp (car methods)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
5716 (assq (car methods) nnoo-definition-alist))) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
5717 (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
|
5718 (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
|
5719 methods) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5720 (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
|
5721 (while (not result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5722 (when (eq gnus-override-method 'current) |
39335
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
5723 (setq gnus-override-method |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
5724 (with-current-buffer gnus-summary-buffer |
65ef5b3fc045
(gnus-request-article-this-buffer): Refer to
Gerd Moellmann <gerd@gnu.org>
parents:
38861
diff
changeset
|
5725 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
|
5726 (erase-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5727 (gnus-kill-all-overlays) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5728 (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
|
5729 (gnus-check-group-server)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5730 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5731 ((gnus-request-article article group (current-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5732 (when (numberp article) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
5733 (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
|
5734 gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5735 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5736 (gnus-backlog-enter-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5737 group article (current-buffer)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5738 (setq result 'article)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5739 (methods |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5740 (setq gnus-override-method (pop methods))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5741 ((not (string-match "^400 " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5742 (nnheader-get-report backend))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5743 ;; If we get 400 server disconnect, reconnect and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5744 ;; retry; otherwise, assume the article has expired. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5745 (setq result 'done)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5746 (and (eq result 'article) 'article))) |
17493 | 5747 ;; It was a pseudo. |
5748 (t article))) | |
5749 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5750 ;; 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
|
5751 (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
|
5752 |
17493 | 5753 ;; Take the article from the original article buffer |
5754 ;; and place it in the buffer it's supposed to be in. | |
5755 (when (and (get-buffer gnus-article-buffer) | |
5756 (equal (buffer-name (current-buffer)) | |
5757 (buffer-name (get-buffer gnus-article-buffer)))) | |
5758 (save-excursion | |
5759 (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
|
5760 (set-buffer gnus-original-article-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5761 (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
|
5762 (buffer-disable-undo) |
17493 | 5763 (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
|
5764 (setq buffer-read-only t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5765 (let ((inhibit-read-only t)) |
17493 | 5766 (erase-buffer) |
5767 (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
|
5768 (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
|
5769 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5770 ;; Decode charsets. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5771 (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
|
5772 ;; 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
|
5773 (setq gnus-article-decoded-p gnus-article-decode-hook)) |
17493 | 5774 |
5775 ;; Update sparse articles. | |
5776 (when (and do-update-line | |
5777 (or (numberp article) | |
5778 (stringp article))) | |
5779 (let ((buf (current-buffer))) | |
5780 (set-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5781 (gnus-summary-update-article do-update-line sparse-header) |
17493 | 5782 (gnus-summary-goto-subject do-update-line nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5783 (set-window-point (gnus-get-buffer-window (current-buffer) t) |
17493 | 5784 (point)) |
5785 (set-buffer buf)))))) | |
5786 | |
5787 ;;; | |
5788 ;;; Article editing | |
5789 ;;; | |
5790 | |
5791 (defcustom gnus-article-edit-mode-hook nil | |
5792 "Hook run in article edit mode buffers." | |
5793 :group 'gnus-article-various | |
5794 :type 'hook) | |
5795 | |
5796 (defvar gnus-article-edit-done-function nil) | |
5797 | |
5798 (defvar gnus-article-edit-mode-map nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5799 (defvar gnus-article-edit-mode nil) |
17493 | 5800 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5801 ;; Should we be using derived.el for this? |
17493 | 5802 (unless gnus-article-edit-mode-map |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5803 (setq gnus-article-edit-mode-map (make-keymap)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5804 (set-keymap-parent gnus-article-edit-mode-map text-mode-map) |
17493 | 5805 |
5806 (gnus-define-keys gnus-article-edit-mode-map | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5807 "\C-c?" describe-mode |
17493 | 5808 "\C-c\C-c" gnus-article-edit-done |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5809 "\C-c\C-k" gnus-article-edit-exit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5810 "\C-c\C-f\C-t" message-goto-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5811 "\C-c\C-f\C-o" message-goto-from |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5812 "\C-c\C-f\C-b" message-goto-bcc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5813 ;;"\C-c\C-f\C-w" message-goto-fcc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5814 "\C-c\C-f\C-c" message-goto-cc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5815 "\C-c\C-f\C-s" message-goto-subject |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5816 "\C-c\C-f\C-r" message-goto-reply-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5817 "\C-c\C-f\C-n" message-goto-newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5818 "\C-c\C-f\C-d" message-goto-distribution |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5819 "\C-c\C-f\C-f" message-goto-followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5820 "\C-c\C-f\C-m" message-goto-mail-followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5821 "\C-c\C-f\C-k" message-goto-keywords |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5822 "\C-c\C-f\C-u" message-goto-summary |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5823 "\C-c\C-f\C-i" message-insert-or-toggle-importance |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5824 "\C-c\C-f\C-a" message-generate-unsubscribed-mail-followup-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5825 "\C-c\C-b" message-goto-body |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5826 "\C-c\C-i" message-goto-signature |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5827 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5828 "\C-c\C-t" message-insert-to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5829 "\C-c\C-n" message-insert-newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5830 "\C-c\C-o" message-sort-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5831 "\C-c\C-e" message-elide-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5832 "\C-c\C-v" message-delete-not-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5833 "\C-c\C-z" message-kill-to-signature |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5834 "\M-\r" message-newline-and-reformat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5835 "\C-c\C-a" mml-attach-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5836 "\C-a" message-beginning-of-line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5837 "\t" message-tab |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5838 "\M-;" comment-region) |
17493 | 5839 |
5840 (gnus-define-keys (gnus-article-edit-wash-map | |
5841 "\C-c\C-w" gnus-article-edit-mode-map) | |
5842 "f" gnus-article-edit-full-stops)) | |
5843 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5844 (easy-menu-define |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5845 gnus-article-edit-mode-field-menu gnus-article-edit-mode-map "" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5846 '("Field" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5847 ["Fetch To" message-insert-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5848 ["Fetch Newsgroups" message-insert-newsgroups t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5849 "----" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5850 ["To" message-goto-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5851 ["From" message-goto-from t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5852 ["Subject" message-goto-subject t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5853 ["Cc" message-goto-cc t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5854 ["Reply-To" message-goto-reply-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5855 ["Summary" message-goto-summary t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5856 ["Keywords" message-goto-keywords t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5857 ["Newsgroups" message-goto-newsgroups t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5858 ["Followup-To" message-goto-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5859 ["Mail-Followup-To" message-goto-mail-followup-to t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5860 ["Distribution" message-goto-distribution t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5861 ["Body" message-goto-body t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5862 ["Signature" message-goto-signature t])) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5863 |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
5864 (define-derived-mode gnus-article-edit-mode message-mode "Article Edit" |
17493 | 5865 "Major mode for editing articles. |
5866 This is an extended text-mode. | |
5867 | |
5868 \\{gnus-article-edit-mode-map}" | |
5869 (make-local-variable 'gnus-article-edit-done-function) | |
5870 (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
|
5871 (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
|
5872 '(message-font-lock-keywords t)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5873 (set (make-local-variable 'mail-header-separator) "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5874 (set (make-local-variable 'gnus-article-edit-mode) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5875 (easy-menu-add message-mode-field-menu message-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5876 (mml-mode) |
17493 | 5877 (setq buffer-read-only nil) |
5878 (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
|
5879 (widen)) |
17493 | 5880 |
5881 (defun gnus-article-edit (&optional force) | |
5882 "Edit the current article. | |
5883 This will have permanent effect only in mail groups. | |
5884 If FORCE is non-nil, allow editing of articles even in read-only | |
5885 groups." | |
5886 (interactive "P") | |
5887 (when (and (not force) | |
5888 (gnus-group-read-only-p)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
5889 (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
|
5890 (gnus-article-date-original) |
17493 | 5891 (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
|
5892 'ignore |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5893 `(lambda (no-highlight) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5894 'ignore |
17493 | 5895 (gnus-summary-edit-article-done |
5896 ,(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
|
5897 ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))) |
17493 | 5898 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
5899 (defun gnus-article-edit-article (start-func exit-func) |
17493 | 5900 "Start editing the contents of the current article buffer." |
5901 (let ((winconf (current-window-configuration))) | |
5902 (set-buffer gnus-article-buffer) | |
57923
d7def5572cf3
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
5903 (let ((message-auto-save-directory |
d7def5572cf3
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
5904 ;; Don't associate the article buffer with a draft file. |
d7def5572cf3
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
5905 nil)) |
d7def5572cf3
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
57856
diff
changeset
|
5906 (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
|
5907 (funcall start-func) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5908 (set-buffer-modified-p nil) |
17493 | 5909 (gnus-configure-windows 'edit-article) |
5910 (setq gnus-article-edit-done-function exit-func) | |
5911 (setq gnus-prev-winconf winconf) | |
5912 (gnus-message 6 "C-c C-c to end edits"))) | |
5913 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
5914 (defun gnus-article-edit-done (&optional arg) |
17493 | 5915 "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
|
5916 (interactive "P") |
17493 | 5917 (let ((func gnus-article-edit-done-function) |
5918 (buf (current-buffer)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5919 (start (window-start)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5920 (p (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5921 (winconf gnus-prev-winconf)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5922 (widen) ;; Widen it in case that users narrowed the buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5923 (funcall func arg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5924 (set-buffer buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5925 ;; The cache and backlog have to be flushed somewhat. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5926 (when gnus-keep-backlog |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5927 (gnus-backlog-remove-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5928 (car gnus-article-current) (cdr gnus-article-current))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5929 ;; Flush original article as well. |
17493 | 5930 (save-excursion |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5931 (when (get-buffer gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5932 (set-buffer gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5933 (setq gnus-original-article nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5934 (when gnus-use-cache |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5935 (gnus-cache-update-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5936 (car gnus-article-current) (cdr gnus-article-current))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5937 ;; We remove all text props from the article buffer. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5938 (kill-all-local-variables) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5939 (gnus-set-text-properties (point-min) (point-max) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5940 (gnus-article-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5941 (set-window-configuration winconf) |
17493 | 5942 (set-buffer buf) |
5943 (set-window-start (get-buffer-window buf) start) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5944 (set-window-point (get-buffer-window buf) (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5945 (gnus-summary-show-article)) |
17493 | 5946 |
5947 (defun gnus-article-edit-exit () | |
5948 "Exit the article editing without updating." | |
5949 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5950 (when (or (not (buffer-modified-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5951 (yes-or-no-p "Article modified; kill anyway? ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5952 (let ((curbuf (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5953 (p (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5954 (window-start (window-start))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5955 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5956 (if (gnus-buffer-live-p gnus-original-article-buffer) |
64631
4556f884d581
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Miles Bader <miles@gnu.org>
parents:
64589
diff
changeset
|
5957 (insert-buffer-substring gnus-original-article-buffer)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5958 (let ((winconf gnus-prev-winconf)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5959 (kill-all-local-variables) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5960 (gnus-article-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5961 (set-window-configuration winconf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5962 ;; Tippy-toe some to make sure that point remains where it was. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5963 (save-current-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5964 (set-buffer curbuf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5965 (set-window-start (get-buffer-window (current-buffer)) window-start) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5966 (goto-char p)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5967 (gnus-summary-show-article))) |
17493 | 5968 |
5969 (defun gnus-article-edit-full-stops () | |
5970 "Interactively repair spacing at end of sentences." | |
5971 (interactive) | |
5972 (save-excursion | |
5973 (goto-char (point-min)) | |
5974 (search-forward-regexp "^$" nil t) | |
5975 (let ((case-fold-search nil)) | |
5976 (query-replace-regexp "\\([.!?][])}]* \\)\\([[({A-Z]\\)" "\\1 \\2")))) | |
5977 | |
5978 ;;; | |
5979 ;;; Article highlights | |
5980 ;;; | |
5981 | |
5982 ;; Written by Per Abrahamsen <abraham@iesd.auc.dk>. | |
5983 | |
5984 ;;; Internal Variables: | |
5985 | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48588
diff
changeset
|
5986 (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
|
5987 (if (string-match "[[:digit:]]" "1") ;; support POSIX? |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5988 "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?[-a-z0-9_=!?#$@~%&*+\\/:;.,[:word:]]+[-a-z0-9_=#$@~%&*+\\/[:word:]]\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5989 "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)\\)") |
17493 | 5990 "Regular expression that matches URLs." |
5991 :group 'gnus-article-buttons | |
5992 :type 'regexp) | |
5993 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5994 (defcustom gnus-button-valid-fqdn-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5995 message-valid-fqdn-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5996 "Regular expression that matches a valid FQDN." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
5997 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5998 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
5999 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6000 |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6001 ;; Regexp suggested by Felix Wiemann in <87oeuomcz9.fsf@news2.ososo.de> |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6002 (defcustom gnus-button-valid-localpart-regexp |
69944
a87e26272828
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-210
Miles Bader <miles@gnu.org>
parents:
69572
diff
changeset
|
6003 "[a-z0-9$%(*-=?[_][^<>\")!;:,{}\n\t @]*" |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6004 "Regular expression that matches a localpart of mail addresses or MIDs." |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6005 :version "22.1" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6006 :group 'gnus-article-buttons |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6007 :type 'regexp) |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6008 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6009 (defcustom gnus-button-man-handler 'manual-entry |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6010 "Function to use for displaying man pages. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6011 The function must take at least one argument with a string naming the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6012 man page." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6013 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6014 :type '(choice (function-item :tag "Man" manual-entry) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6015 (function-item :tag "Woman" woman) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6016 (function :tag "Other")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6017 :group 'gnus-article-buttons) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6018 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6019 (defcustom gnus-ctan-url "http://tug.ctan.org/tex-archive/" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6020 "Top directory of a CTAN \(Comprehensive TeX Archive Network\) archive. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6021 If the default site is too slow, try to find a CTAN mirror, see |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6022 <URL:http://tug.ctan.org/tex-archive/CTAN.sites?action=/index.html>. See also |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6023 the variable `gnus-button-handle-ctan'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6024 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6025 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6026 :link '(custom-manual "(gnus)Group Parameters") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6027 :type '(choice (const "http://www.tex.ac.uk/tex-archive/") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6028 (const "http://tug.ctan.org/tex-archive/") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6029 (const "http://www.dante.de/CTAN/") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6030 (string :tag "Other"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6031 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6032 (defcustom gnus-button-ctan-handler 'browse-url |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6033 "Function to use for displaying CTAN links. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6034 The function must take one argument, the string naming the URL." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6035 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6036 :type '(choice (function-item :tag "Browse Url" browse-url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6037 (function :tag "Other")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6038 :group 'gnus-article-buttons) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6039 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6040 (defcustom gnus-button-handle-ctan-bogus-regexp "^/?tex-archive/\\|^/" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6041 "Bogus strings removed from CTAN URLs." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6042 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6043 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6044 :type '(choice (const "^/?tex-archive/\\|/") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6045 (regexp :tag "Other"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6046 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6047 (defcustom gnus-button-ctan-directory-regexp |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6048 (regexp-opt |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6049 (list "archive-tools" "biblio" "bibliography" "digests" "documentation" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6050 "dviware" "fonts" "graphics" "help" "indexing" "info" "language" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6051 "languages" "macros" "nonfree" "obsolete" "support" "systems" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6052 "tds" "tools" "usergrps" "web") t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6053 "Regular expression for ctan directories. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6054 It should match all directories in the top level of `gnus-ctan-url'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6055 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6056 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6057 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6058 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6059 (defcustom gnus-button-mid-or-mail-regexp |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6060 (concat "\\b\\(<?" gnus-button-valid-localpart-regexp "@" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6061 gnus-button-valid-fqdn-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6062 ">?\\)\\b") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6063 "Regular expression that matches a message ID or a mail address." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6064 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6065 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6066 :type 'regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6067 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6068 (defcustom gnus-button-prefer-mid-or-mail 'gnus-button-mid-or-mail-heuristic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6069 "What to do when the button on a string as \"foo123@bar.invalid\" is pushed. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6070 Strings like this can be either a message ID or a mail address. If it is one |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6071 of the symbols `mid' or `mail', Gnus will always assume that the string is a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6072 message ID or a mail address, respectively. If this variable is set to the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6073 symbol `ask', always query the user what do do. If it is a function, this |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6074 function will be called with the string as it's only argument. The function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6075 must return `mid', `mail', `invalid' or `ask'." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6076 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6077 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6078 :type '(choice (function-item :tag "Heuristic function" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6079 gnus-button-mid-or-mail-heuristic) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6080 (const ask) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6081 (const mid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6082 (const mail))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6083 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6084 (defcustom gnus-button-mid-or-mail-heuristic-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6085 '((-10.0 . ".+\\$.+@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6086 (-10.0 . "#") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6087 (-10.0 . "\\*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6088 (-5.0 . "\\+[^+]*\\+.*@") ;; # two plus signs |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6089 (-5.0 . "@[Nn][Ee][Ww][Ss]") ;; /\@news/i |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6090 (-5.0 . "@.*[Dd][Ii][Aa][Ll][Uu][Pp]") ;; /\@.*dialup/i; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6091 (-1.0 . "^[^a-z]+@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6092 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6093 (-5.0 . "\\.[0-9][0-9]+.*@") ;; "\.[0-9]{2,}.*\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6094 (-5.0 . "[a-z].*[A-Z].*[a-z].*[A-Z].*@") ;; "([a-z].*[A-Z].*){2,}\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6095 (-3.0 . "[A-Z][A-Z][a-z][a-z].*@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6096 (-5.0 . "\\...?.?@") ;; (-5.0 . "\..{1,3}\@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6097 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6098 (-2.0 . "^[0-9]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6099 (-1.0 . "^[0-9][0-9]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6100 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6101 ;; -3.0 /^[0-9][0-9a-fA-F]{2,2}/; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6102 (-3.0 . "^[0-9][0-9a-fA-F][0-9a-fA-F][^0-9a-fA-F]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6103 ;; -5.0 /^[0-9][0-9a-fA-F]{3,3}/; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6104 (-5.0 . "^[0-9][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][^0-9a-fA-F]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6105 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6106 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][^0-9].*@") ;; "[0-9]{5,}.*\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6107 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][^0-9].*@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6108 ;; "[0-9]{8,}.*\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6109 (-3.0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6110 . "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6111 ;; "[0-9]{12,}.*\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6112 ;; compensation for TDMA dated mail addresses: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6113 (25.0 . "-dated-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]+.*@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6114 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6115 (-20.0 . "\\.fsf@") ;; Gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6116 (-20.0 . "^slrn") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6117 (-20.0 . "^Pine") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6118 (-20.0 . "_-_") ;; Subject change in thread |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6119 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6120 (-20.0 . "\\.ln@") ;; leafnode |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6121 (-30.0 . "@ID-[0-9]+\\.[a-zA-Z]+\\.dfncis\\.de") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6122 (-30.0 . "@4[Aa][Xx]\\.com") ;; Forte Agent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6123 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6124 ;; (5.0 . "") ;; $local_part_len <= 7 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6125 (10.0 . "^[^0-9]+@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6126 (3.0 . "^[^0-9]+[0-9][0-9]?[0-9]?@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6127 ;; ^[^0-9]+[0-9]{1,3}\@ digits only at end of local part |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6128 (3.0 . "\@stud") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6129 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6130 (2.0 . "[a-z][a-z][._-][A-Z][a-z].*@") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6131 ;; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6132 (0.5 . "^[A-Z][a-z]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6133 (0.5 . "^[A-Z][a-z][a-z]") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6134 (1.5 . "^[A-Z][a-z][A-Z][a-z][^a-z]") ;; ^[A-Z][a-z]{3,3} |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6135 (2.0 . "^[A-Z][a-z][A-Z][a-z][a-z][^a-z]")) ;; ^[A-Z][a-z]{4,4} |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6136 "An alist of \(RATE . REGEXP\) pairs for `gnus-button-mid-or-mail-heuristic'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6137 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6138 A negative RATE indicates a message IDs, whereas a positive indicates a mail |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6139 address. The REGEXP is processed with `case-fold-search' set to nil." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6140 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6141 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6142 :type '(repeat (cons (number :tag "Rate") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6143 (regexp :tag "Regexp")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6144 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6145 (defun gnus-button-mid-or-mail-heuristic (mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6146 "Guess whether MID-OR-MAIL is a message ID or a mail address. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6147 Returns `mid' if MID-OR-MAIL is a message IDs, `mail' if it's a mail |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6148 address, `ask' if unsure and `invalid' if the string is invalid." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6149 (let ((case-fold-search nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6150 (list gnus-button-mid-or-mail-heuristic-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6151 (result 0) rate regexp lpartlen elem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6152 (setq lpartlen |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6153 (length (gnus-replace-in-string mid-or-mail "^\\(.*\\)@.*$" "\\1"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6154 (gnus-message 8 "`%s', length of local part=`%s'." mid-or-mail lpartlen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6155 ;; Certain special cases... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6156 (when (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6157 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6158 "^0[0-9]+-[0-9][0-9][0-9][0-9]@t-online\\.de$\\|" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6159 "^[0-9]+\\.[0-9]+@compuserve\\|" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6160 "@public\\.gmane\\.org") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6161 mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6162 (gnus-message 8 "`%s' is a known mail address." mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6163 (setq result 'mail)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6164 (when (string-match "@.*@\\| " mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6165 (gnus-message 8 "`%s' is invalid." mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6166 (setq result 'invalid)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6167 ;; Nothing more to do, if result is not a number here... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6168 (when (numberp result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6169 (while list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6170 (setq elem (car list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6171 rate (car elem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6172 regexp (cdr elem) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6173 list (cdr list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6174 (when (string-match regexp mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6175 (setq result (+ result rate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6176 (gnus-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6177 9 "`%s' matched `%s', rate `%s', result `%s'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6178 mid-or-mail regexp rate result))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6179 (when (<= lpartlen 7) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6180 (setq result (+ result 5.0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6181 (gnus-message 9 "`%s' matched (<= lpartlen 7), result `%s'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6182 mid-or-mail result)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6183 (when (>= lpartlen 12) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6184 (gnus-message 9 "`%s' matched (>= lpartlen 12)" mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6185 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6186 ((string-match "[0-9][^0-9]+[0-9].*@" mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6187 ;; Long local part should contain realname if e-mail address, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6188 ;; too many digits: message-id. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6189 ;; $score -= 5.0 + 0.1 * $local_part_len; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6190 (setq rate (* -1.0 (+ 5.0 (* 0.1 lpartlen)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6191 (setq result (+ result rate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6192 (gnus-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6193 9 "Many digits in `%s', rate `%s', result `%s'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6194 mid-or-mail rate result)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6195 ((string-match "[^aeiouy][^aeiouy][^aeiouy][^aeiouy]+.*\@" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6196 mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6197 ;; Too few vowels [^aeiouy]{4,}.*\@ |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6198 (setq result (+ result -5.0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6199 (gnus-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6200 9 "Few vowels in `%s', rate `%s', result `%s'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6201 mid-or-mail -5.0 result)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6202 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6203 (setq result (+ result 5.0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6204 (gnus-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6205 9 "`%s', rate `%s', result `%s'." mid-or-mail 5.0 result))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6206 (gnus-message 8 "`%s': Final rate is `%s'." mid-or-mail result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6207 ;; Maybe we should make this a customizable alist: (condition . 'result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6208 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6209 ((symbolp result) result) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6210 ;; Now convert number into proper results: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6211 ((< result -10.0) 'mid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6212 ((> result 10.0) 'mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6213 (t 'ask)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6214 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6215 (defun gnus-button-handle-mid-or-mail (mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6216 (let* ((pref gnus-button-prefer-mid-or-mail) guessed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6217 (url-mid (concat "news" ":" mid-or-mail)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6218 (url-mailto (concat "mailto" ":" mid-or-mail))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6219 (gnus-message 9 "mid-or-mail=%s" mid-or-mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6220 (when (fboundp pref) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6221 (setq guessed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6222 ;; get rid of surrounding angles... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6223 (funcall pref |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6224 (gnus-replace-in-string mid-or-mail "^<\\|>$" ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6225 (if (or (eq 'mid guessed) (eq 'mail guessed)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6226 (setq pref guessed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6227 (setq pref 'ask))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6228 (if (eq pref 'ask) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6229 (save-window-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6230 (if (y-or-n-p (concat "Is <" mid-or-mail "> a mail address? ")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6231 (setq pref 'mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6232 (setq pref 'mid)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6233 (cond ((eq pref 'mid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6234 (gnus-message 8 "calling `gnus-button-handle-news' %s" url-mid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6235 (gnus-button-handle-news url-mid)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6236 ((eq pref 'mail) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6237 (gnus-message 8 "calling `gnus-url-mailto' %s" url-mailto) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6238 (gnus-url-mailto url-mailto)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6239 (t (gnus-message 3 "Invalid string."))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6240 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6241 (defun gnus-button-handle-custom (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6242 "Follow a Custom URL." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6243 (customize-apropos (gnus-url-unhex-string url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6244 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6245 (defvar gnus-button-handle-describe-prefix "^\\(C-h\\|<?[Ff]1>?\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6246 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6247 ;; FIXME: Maybe we should merge some of the functions that do quite similar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6248 ;; stuff? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6249 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6250 (defun gnus-button-handle-describe-function (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6251 "Call `describe-function' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6252 (describe-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6253 (intern |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6254 (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6255 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6256 (defun gnus-button-handle-describe-variable (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6257 "Call `describe-variable' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6258 (describe-variable |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6259 (intern |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6260 (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6261 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6262 (defun gnus-button-handle-symbol (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6263 "Display help on variable or function. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6264 Calls `describe-variable' or `describe-function'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6265 (let ((sym (intern url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6266 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6267 ((fboundp sym) (describe-function sym)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6268 ((boundp sym) (describe-variable sym)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6269 (t (gnus-message 3 "`%s' is not a known function of variable." url))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6270 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6271 (defun gnus-button-handle-describe-key (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6272 "Call `describe-key' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6273 (let* ((key-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6274 (gnus-replace-in-string url gnus-button-handle-describe-prefix "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6275 (keys (ignore-errors (eval `(kbd ,key-string))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6276 (if keys |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6277 (describe-key keys) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6278 (gnus-message 3 "Invalid key sequence in button: %s" key-string)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6279 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6280 (defun gnus-button-handle-apropos (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6281 "Call `apropos' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6282 (apropos (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6283 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6284 (defun gnus-button-handle-apropos-command (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6285 "Call `apropos' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6286 (apropos-command |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6287 (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6288 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6289 (defun gnus-button-handle-apropos-variable (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6290 "Call `apropos' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6291 (funcall |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6292 (if (fboundp 'apropos-variable) 'apropos-variable 'apropos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6293 (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6294 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6295 (defun gnus-button-handle-apropos-documentation (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6296 "Call `apropos' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6297 (funcall |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6298 (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6299 (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6300 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6301 (defun gnus-button-handle-library (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6302 "Call `locate-library' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6303 (gnus-message 9 "url=`%s'" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6304 (let* ((lib (locate-library url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6305 (file (gnus-replace-in-string (or lib "") "\.elc" ".el"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6306 (if (not lib) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6307 (gnus-message 1 "Cannot locale library `%s'." url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6308 (find-file-read-only file)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6309 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6310 (defun gnus-button-handle-ctan (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6311 "Call `browse-url' when pushing a CTAN URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6312 (funcall |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6313 gnus-button-ctan-handler |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6314 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6315 gnus-ctan-url |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6316 (gnus-replace-in-string url gnus-button-handle-ctan-bogus-regexp "")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6317 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6318 (defcustom gnus-button-tex-level 5 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6319 "*Integer that says how many TeX-related buttons Gnus will show. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6320 The higher the number, the more buttons will appear and the more false |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6321 positives are possible. Note that you can set this variable local to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6322 specific groups. Setting it higher in TeX groups is probably a good idea. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6323 See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6324 how to set variables in specific groups." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6325 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6326 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6327 :link '(custom-manual "(gnus)Group Parameters") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6328 :type 'integer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6329 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6330 (defcustom gnus-button-man-level 5 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6331 "*Integer that says how many man-related buttons Gnus will show. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6332 The higher the number, the more buttons will appear and the more false |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6333 positives are possible. Note that you can set this variable local to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6334 specific groups. Setting it higher in Unix groups is probably a good idea. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6335 See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6336 how to set variables in specific groups." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6337 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6338 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6339 :link '(custom-manual "(gnus)Group Parameters") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6340 :type 'integer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6341 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6342 (defcustom gnus-button-emacs-level 5 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6343 "*Integer that says how many emacs-related buttons Gnus will show. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6344 The higher the number, the more buttons will appear and the more false |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6345 positives are possible. Note that you can set this variable local to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6346 specific groups. Setting it higher in Emacs or Gnus related groups is |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6347 probably a good idea. See Info node `(gnus)Group Parameters' and the variable |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6348 `gnus-parameters' on how to set variables in specific groups." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6349 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6350 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6351 :link '(custom-manual "(gnus)Group Parameters") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6352 :type 'integer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6353 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6354 (defcustom gnus-button-message-level 5 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6355 "*Integer that says how many buttons for news or mail messages will appear. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6356 The higher the number, the more buttons will appear and the more false |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6357 positives are possible." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6358 ;; mail addresses, MIDs, URLs for news, ... |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6359 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6360 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6361 :type 'integer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6362 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6363 (defcustom gnus-button-browse-level 5 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6364 "*Integer that says how many buttons for browsing will appear. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6365 The higher the number, the more buttons will appear and the more false |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6366 positives are possible." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6367 ;; stuff handled by `browse-url' or `gnus-button-embedded-url' |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6368 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6369 :group 'gnus-article-buttons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6370 :type 'integer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6371 |
17493 | 6372 (defcustom gnus-button-alist |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6373 '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6374 0 (>= gnus-button-message-level 0) gnus-button-handle-news 3) |
64735
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6375 ((concat "\\b\\(nntp\\|news\\):\\(" |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6376 gnus-button-valid-localpart-regexp "@[a-z0-9.-]+[a-z]\\)") |
bfabe4ff7114
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Miles Bader <miles@gnu.org>
parents:
64693
diff
changeset
|
6377 0 t gnus-button-handle-news 2) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6378 ("\\(\\b<\\(url:[>\n\t ]*\\)?\\(nntp\\|news\\):[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6379 1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6380 ("\\b\\(nntp\\|news\\):\\(//\\)?\\([^'\">\n\t ]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6381 0 (>= gnus-button-message-level 0) gnus-button-fetch-group 3) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6382 ;; RFC 2392 (Don't allow `/' in domain part --> CID) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6383 ("\\bmid:\\(//\\)?\\([^'\">\n\t ]+@[^'\">\n\t /]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6384 0 (>= gnus-button-message-level 0) gnus-button-message-id 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6385 ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6386 2 (>= gnus-button-message-level 0) gnus-button-message-id 3) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6387 ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6388 0 (>= gnus-button-message-level 0) gnus-url-mailto 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6389 ;; RFC 2368 (The mailto URL scheme) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6390 ("\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6391 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6392 ("\\bmailto:\\([^ \n\t]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6393 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6394 ;; CTAN |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6395 ((concat "\\bCTAN:[ \t\n]?[^>)!;:,'\n\t ]*\\(" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6396 gnus-button-ctan-directory-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6397 "[^][>)!;:,'\n\t ]+\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6398 0 (>= gnus-button-tex-level 1) gnus-button-handle-ctan 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6399 ((concat "\\btex-archive/\\(" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6400 gnus-button-ctan-directory-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6401 "/[-_.a-z0-9/]+[-_./a-z0-9]+[/a-z0-9]\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6402 1 (>= gnus-button-tex-level 6) gnus-button-handle-ctan 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6403 ((concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6404 "\\b\\(" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6405 gnus-button-ctan-directory-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6406 "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6407 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6408 ;; This is info (home-grown style) <info://foo/bar+baz> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6409 ("\\binfo://\\([^'\">\n\t ]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6410 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6411 ;; Info GNOME style <info:foo#bar_baz> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6412 ("\\binfo:\\([^('\n\t\r \"><][^'\n\t\r \"><]*\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6413 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-gnome 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6414 ;; Info KDE style <info:(foo)bar baz> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6415 ("<\\(info:\\(([^)]+)[^>\n\r]*\\)\\)>" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6416 1 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-kde 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6417 ("\\((Info-goto-node\\|(info\\)[ \t\n]*\\(\"[^\"]*\"\\))" 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6418 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6419 ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+i[ \t\n]+d?[ \t\n]?m[ \t\n]+\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6420 ;; Info links like `C-h i d m CC Mode RET' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6421 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6422 ;; This is custom |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6423 ("\\bcustom:\\(//\\)?\\([^'\">\n\t ]+\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6424 0 (>= gnus-button-emacs-level 5) gnus-button-handle-custom 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6425 ("M-x[ \t\n]customize-[^ ]+[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6426 (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6427 ;; Emacs help commands |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6428 ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6429 ;; regexp doesn't match arguments containing ` '. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6430 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6431 ("M-x[ \t\n]+apropos-command[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6432 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6433 ("M-x[ \t\n]+apropos-variable[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6434 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6435 ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6436 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6437 ;; The following entries may lead to many false positives so don't enable |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6438 ;; them by default (use a high button level). |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6439 ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6440 ;; Exclude [.?] for URLs in gmane.emacs.cvs |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6441 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6442 ("`\\([a-z][-a-z0-9]+\\.el\\)'" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6443 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6444 ("`\\([a-z][a-z0-9]+-[a-z]+-[-a-z]+\\|\\(gnus\\|message\\)-[-a-z]+\\)'" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6445 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6446 ("`\\([a-z][a-z0-9]+-[a-z]+\\)'" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6447 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6448 ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6449 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6450 ("\\bM-x[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6451 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-function 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6452 ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6453 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6454 ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6455 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6456 ("`\\(\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6457 ;; Unlike the other regexps we really have to require quoting |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6458 ;; here to determine where it ends. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6459 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6460 ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6461 ("<URL: *\\([^<>]*\\)>" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6462 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6463 ;; RFC 2396 (2.4.3., delims) ... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6464 ("\"URL: *\\([^\"]*\\)\"" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6465 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6466 ;; RFC 2396 (2.4.3., delims) ... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6467 ("\"URL: *\\([^\"]*\\)\"" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6468 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) |
17493 | 6469 ;; Raw URLs. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6470 (gnus-button-url-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6471 0 (>= gnus-button-browse-level 0) browse-url 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6472 ;; man pages |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6473 ("\\b\\([a-z][a-z]+([1-9])\\)\\W" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6474 0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6475 gnus-button-handle-man 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6476 ;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6477 ("\\b\\([a-z][-_.a-z0-9]+([1-9])\\)\\W" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6478 0 (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6479 gnus-button-handle-man 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6480 ;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm), |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6481 ;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6482 ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6483 0 (>= gnus-button-man-level 5) gnus-button-handle-man 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6484 ;; MID or mail: To avoid too many false positives we don't try to catch |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6485 ;; all kind of allowed MIDs or mail addresses. Domain part must contain |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6486 ;; at least one dot. TLD must contain two or three chars or be a know TLD |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6487 ;; (info|name|...). Put this entry near the _end_ of `gnus-button-alist' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6488 ;; so that non-ambiguous entries (see above) match first. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6489 (gnus-button-mid-or-mail-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6490 0 (>= gnus-button-message-level 5) gnus-button-handle-mid-or-mail 1)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
6491 "*Alist of regexps matching buttons in article bodies. |
17493 | 6492 |
6493 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6494 REGEXP: is the string (case insensitive) matching text around the button (can |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6495 also be Lisp expression evaluating to a string), |
17493 | 6496 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
|
6497 FORM: is a Lisp expression which must eval to true for the button to |
17493 | 6498 be added, |
6499 CALLBACK: is the function to call when the user push this button, and each | |
6500 PAR: is a number of a regexp grouping whose text will be passed to CALLBACK. | |
6501 | |
6502 CALLBACK can also be a variable, in that case the value of that | |
6503 variable it the real callback function." | |
6504 :group 'gnus-article-buttons | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6505 :type '(repeat (list (choice regexp variable sexp) |
17493 | 6506 (integer :tag "Button") |
6507 (sexp :tag "Form") | |
6508 (function :tag "Callback") | |
6509 (repeat :tag "Par" | |
6510 :inline t | |
6511 (integer :tag "Regexp group"))))) | |
6512 | |
6513 (defcustom gnus-header-button-alist | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6514 '(("^\\(References\\|Message-I[Dd]\\|^In-Reply-To\\):" "<[^<>]+>" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6515 0 (>= gnus-button-message-level 0) gnus-button-message-id 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6516 ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6517 1 (>= gnus-button-message-level 0) gnus-button-reply 1) |
17493 | 6518 ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" |
60696
7503b2a24a3c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-187
Miles Bader <miles@gnu.org>
parents:
60239
diff
changeset
|
6519 0 (>= gnus-button-message-level 0) gnus-msg-mail 0) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6520 ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6521 0 (>= gnus-button-browse-level 0) browse-url 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6522 ("^Subject:" gnus-button-url-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6523 0 (>= gnus-button-browse-level 0) browse-url 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6524 ("^[^:]+:" gnus-button-url-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6525 0 (>= gnus-button-browse-level 0) browse-url 0) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6526 ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6527 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6528 ("^[^:]+:" "\\(<\\(url: \\)?\\(nntp\\|news\\):\\([^>\n ]*\\)>\\)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6529 1 (>= gnus-button-message-level 0) gnus-button-message-id 4)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23608
diff
changeset
|
6530 "*Alist of headers and regexps to match buttons in article heads. |
17493 | 6531 |
6532 This alist is very similar to `gnus-button-alist', except that each | |
6533 alist has an additional HEADER element first in each entry: | |
6534 | |
6535 \(HEADER REGEXP BUTTON FORM CALLBACK PAR) | |
6536 | |
6537 HEADER is a regexp to match a header. For a fuller explanation, see | |
6538 `gnus-button-alist'." | |
6539 :group 'gnus-article-buttons | |
6540 :group 'gnus-article-headers | |
6541 :type '(repeat (list (regexp :tag "Header") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6542 (choice regexp variable) |
17493 | 6543 (integer :tag "Button") |
6544 (sexp :tag "Form") | |
6545 (function :tag "Callback") | |
6546 (repeat :tag "Par" | |
6547 :inline t | |
6548 (integer :tag "Regexp group"))))) | |
6549 | |
6550 (defvar gnus-button-regexp nil) | |
6551 (defvar gnus-button-marker-list nil) | |
6552 ;; Regexp matching any of the regexps from `gnus-button-alist'. | |
6553 | |
6554 (defvar gnus-button-last nil) | |
6555 ;; The value of `gnus-button-alist' when `gnus-button-regexp' was build. | |
6556 | |
6557 ;;; Commands: | |
6558 | |
6559 (defun gnus-article-push-button (event) | |
6560 "Check text under the mouse pointer for a callback function. | |
6561 If the text under the mouse pointer has a `gnus-callback' property, | |
6562 call it with the value of the `gnus-data' text property." | |
6563 (interactive "e") | |
6564 (set-buffer (window-buffer (posn-window (event-start event)))) | |
6565 (let* ((pos (posn-point (event-start event))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6566 (data (get-text-property pos 'gnus-data)) |
17493 | 6567 (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
|
6568 (goto-char pos) |
17493 | 6569 (when fun |
6570 (funcall fun data)))) | |
6571 | |
6572 (defun gnus-article-press-button () | |
6573 "Check text at point for a callback function. | |
6574 If the text at point has a `gnus-callback' property, | |
6575 call it with the value of the `gnus-data' text property." | |
6576 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6577 (let ((data (get-text-property (point) 'gnus-data)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6578 (fun (get-text-property (point) 'gnus-callback))) |
17493 | 6579 (when fun |
6580 (funcall fun data)))) | |
6581 | |
6582 (defun gnus-article-highlight (&optional force) | |
6583 "Highlight current article. | |
6584 This function calls `gnus-article-highlight-headers', | |
6585 `gnus-article-highlight-citation', | |
6586 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
6587 do the highlighting. See the documentation for those functions." | |
6588 (interactive (list 'force)) | |
6589 (gnus-article-highlight-headers) | |
6590 (gnus-article-highlight-citation force) | |
6591 (gnus-article-highlight-signature) | |
6592 (gnus-article-add-buttons force) | |
6593 (gnus-article-add-buttons-to-head)) | |
6594 | |
6595 (defun gnus-article-highlight-some (&optional force) | |
6596 "Highlight current article. | |
6597 This function calls `gnus-article-highlight-headers', | |
6598 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | |
6599 do the highlighting. See the documentation for those functions." | |
6600 (interactive (list 'force)) | |
6601 (gnus-article-highlight-headers) | |
6602 (gnus-article-highlight-signature) | |
6603 (gnus-article-add-buttons)) | |
6604 | |
6605 (defun gnus-article-highlight-headers () | |
6606 "Highlight article headers as specified by `gnus-header-face-alist'." | |
6607 (interactive) | |
6608 (save-excursion | |
6609 (set-buffer gnus-article-buffer) | |
6610 (save-restriction | |
6611 (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
|
6612 (inhibit-read-only t) |
17493 | 6613 (case-fold-search t) |
6614 (inhibit-point-motion-hooks t) | |
6615 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
|
6616 (article-narrow-to-head) |
17493 | 6617 (while (setq entry (pop alist)) |
6618 (goto-char (point-min)) | |
6619 (setq regexp (concat "^\\(" | |
6620 (if (string-equal "" (nth 0 entry)) | |
6621 "[^\t ]" | |
6622 (nth 0 entry)) | |
6623 "\\)") | |
6624 header-face (nth 1 entry) | |
6625 field-face (nth 2 entry)) | |
6626 (while (and (re-search-forward regexp nil t) | |
6627 (not (eobp))) | |
6628 (beginning-of-line) | |
6629 (setq from (point)) | |
6630 (unless (search-forward ":" nil t) | |
6631 (forward-char 1)) | |
6632 (when (and header-face | |
6633 (not (memq (point) hpoints))) | |
6634 (push (point) hpoints) | |
6635 (gnus-put-text-property from (point) 'face header-face)) | |
6636 (when (and field-face | |
6637 (not (memq (setq from (point)) fpoints))) | |
6638 (push from fpoints) | |
6639 (if (re-search-forward "^[^ \t]" nil t) | |
6640 (forward-char -2) | |
6641 (goto-char (point-max))) | |
6642 (gnus-put-text-property from (point) 'face field-face)))))))) | |
6643 | |
6644 (defun gnus-article-highlight-signature () | |
6645 "Highlight the signature in an article. | |
6646 It does this by highlighting everything after | |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
63026
diff
changeset
|
6647 `gnus-signature-separator' using the face `gnus-signature'." |
17493 | 6648 (interactive) |
6649 (save-excursion | |
6650 (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
|
6651 (let ((inhibit-read-only t) |
17493 | 6652 (inhibit-point-motion-hooks t)) |
6653 (save-restriction | |
6654 (when (and gnus-signature-face | |
6655 (gnus-article-narrow-to-signature)) | |
6656 (gnus-overlay-put (gnus-make-overlay (point-min) (point-max)) | |
6657 'face gnus-signature-face) | |
6658 (widen) | |
6659 (gnus-article-search-signature) | |
6660 (let ((start (match-beginning 0)) | |
6661 (end (set-marker (make-marker) (1+ (match-end 0))))) | |
6662 (gnus-article-add-button start (1- end) 'gnus-signature-toggle | |
6663 end))))))) | |
6664 | |
6665 (defun gnus-button-in-region-p (b e prop) | |
6666 "Say whether PROP exists in the region." | |
6667 (text-property-not-all b e prop nil)) | |
6668 | |
6669 (defun gnus-article-add-buttons (&optional force) | |
6670 "Find external references in the article and make buttons of them. | |
6671 \"External references\" are things like Message-IDs and URLs, as | |
6672 specified by `gnus-button-alist'." | |
6673 (interactive (list 'force)) | |
6674 (save-excursion | |
6675 (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
|
6676 (let ((inhibit-read-only t) |
17493 | 6677 (inhibit-point-motion-hooks t) |
6678 (case-fold-search t) | |
6679 (alist gnus-button-alist) | |
6680 beg entry regexp) | |
6681 ;; 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
|
6682 (let (marker entry new-list) |
17493 | 6683 (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
|
6684 (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
|
6685 (push marker new-list) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6686 (goto-char marker) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6687 (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
|
6688 (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
|
6689 (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
|
6690 'gnus-callback nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6691 (set-marker marker nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6692 (setq gnus-button-marker-list new-list)) |
17493 | 6693 ;; 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
|
6694 (article-goto-body) |
17493 | 6695 (setq beg (point)) |
6696 (while (setq entry (pop alist)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6697 (setq regexp (eval (car entry))) |
17493 | 6698 (goto-char beg) |
6699 (while (re-search-forward regexp nil t) | |
6700 (let* ((start (and entry (match-beginning (nth 1 entry)))) | |
6701 (end (and entry (match-end (nth 1 entry)))) | |
6702 (from (match-beginning 0))) | |
6703 (when (and (or (eq t (nth 2 entry)) | |
6704 (eval (nth 2 entry))) | |
6705 (not (gnus-button-in-region-p | |
6706 start end 'gnus-callback))) | |
6707 ;; That optional form returned non-nil, so we add the | |
6708 ;; button. | |
6709 (gnus-article-add-button | |
6710 start end 'gnus-button-push | |
6711 (car (push (set-marker (make-marker) from) | |
6712 gnus-button-marker-list)))))))))) | |
6713 | |
6714 ;; Add buttons to the head of an article. | |
6715 (defun gnus-article-add-buttons-to-head () | |
6716 "Add buttons to the head of the article." | |
6717 (interactive) | |
6718 (save-excursion | |
6719 (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
|
6720 (save-restriction |
54492
75c387f0b055
Use inhibit-read-only instead of buffer-read-only.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
6721 (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
|
6722 (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
|
6723 (case-fold-search t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6724 (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
|
6725 entry beg end) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6726 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6727 (while alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6728 ;; Each alist entry. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6729 (setq entry (car alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6730 alist (cdr alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6731 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6732 (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
|
6733 ;; 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
|
6734 (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
|
6735 (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
|
6736 (match-beginning 0)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6737 (point-max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6738 (goto-char beg) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6739 (while (re-search-forward (eval (nth 1 entry)) end t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6740 ;; 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
|
6741 (let* ((entry (cdr entry)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6742 (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
|
6743 (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
|
6744 (form (nth 2 entry))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6745 (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
|
6746 (when (eval form) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6747 (gnus-article-add-button |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
6748 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
|
6749 (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
|
6750 (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
|
6751 (goto-char end))))))) |
17493 | 6752 |
6753 ;;; External functions: | |
6754 | |
6755 (defun gnus-article-add-button (from to fun &optional data) | |
6756 "Create a button between FROM and TO with callback FUN and data DATA." | |
6757 (when gnus-article-button-face | |
6758 (gnus-overlay-put (gnus-make-overlay from to) | |
6759 'face gnus-article-button-face)) | |
6760 (gnus-add-text-properties | |
6761 from to | |
6762 (nconc (and gnus-article-mouse-face | |
6763 (list gnus-mouse-face-prop gnus-article-mouse-face)) | |
6764 (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
|
6765 (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
|
6766 (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
|
6767 :button-keymap gnus-widget-button-keymap)) |
17493 | 6768 |
6769 ;;; Internal functions: | |
6770 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
6771 (defun gnus-article-set-globals () |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
6772 (save-excursion |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
6773 (set-buffer gnus-summary-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
6774 (gnus-set-global-variables))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19537
diff
changeset
|
6775 |
17493 | 6776 (defun gnus-signature-toggle (end) |
6777 (save-excursion | |
6778 (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
|
6779 (let ((inhibit-read-only t) |
17493 | 6780 (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
|
6781 (if (text-property-any end (point-max) 'article-type 'signature) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6782 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6783 (gnus-delete-wash-type 'signature) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6784 (gnus-remove-text-properties-when |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6785 'article-type 'signature end (point-max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6786 (cons 'article-type (cons 'signature |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6787 gnus-hidden-properties)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6788 (gnus-add-wash-type 'signature) |
34727
4b9a7a10deaa
* gnus-util.el (gnus-add-text-properties-when): New function.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
33691
diff
changeset
|
6789 (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
|
6790 '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
|
6791 (cons 'article-type (cons 'signature |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6792 gnus-hidden-properties))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6793 (let ((gnus-article-mime-handle-alist-1 gnus-article-mime-handle-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6794 (gnus-set-mode-line 'article)))) |
17493 | 6795 |
6796 (defun gnus-button-entry () | |
6797 ;; Return the first entry in `gnus-button-alist' matching this place. | |
6798 (let ((alist gnus-button-alist) | |
6799 (entry nil)) | |
6800 (while alist | |
6801 (setq entry (pop alist)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6802 (if (looking-at (eval (car entry))) |
17493 | 6803 (setq alist nil) |
6804 (setq entry nil))) | |
6805 entry)) | |
6806 | |
6807 (defun gnus-button-push (marker) | |
6808 ;; Push button starting at MARKER. | |
6809 (save-excursion | |
6810 (goto-char marker) | |
6811 (let* ((entry (gnus-button-entry)) | |
6812 (inhibit-point-motion-hooks t) | |
6813 (fun (nth 3 entry)) | |
6814 (args (mapcar (lambda (group) | |
6815 (let ((string (match-string group))) | |
6816 (gnus-set-text-properties | |
6817 0 (length string) nil string) | |
6818 string)) | |
6819 (nthcdr 4 entry)))) | |
6820 (cond | |
6821 ((fboundp fun) | |
6822 (apply fun args)) | |
6823 ((and (boundp fun) | |
6824 (fboundp (symbol-value fun))) | |
6825 (apply (symbol-value fun) args)) | |
6826 (t | |
6827 (gnus-message 1 "You must define `%S' to use this button" | |
6828 (cons fun args))))))) | |
6829 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6830 (defun gnus-parse-news-url (url) |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6831 (let (scheme server port group message-id articles) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6832 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6833 (insert url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6834 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6835 (when (looking-at "\\([A-Za-z]+\\):") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6836 (setq scheme (match-string 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6837 (goto-char (match-end 0))) |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6838 (when (looking-at "//\\([^:/]+\\)\\(:?\\)\\([0-9]+\\)?/") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6839 (setq server (match-string 1)) |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6840 (setq port (if (stringp (match-string 3)) |
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6841 (string-to-number (match-string 3)) |
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6842 (match-string 3))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6843 (goto-char (match-end 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6844 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6845 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6846 ((looking-at "\\(.*@.*\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6847 (setq message-id (match-string 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6848 ((looking-at "\\([^/]+\\)/\\([-0-9]+\\)") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6849 (setq group (match-string 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6850 articles (split-string (match-string 2) "-"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6851 ((looking-at "\\([^/]+\\)/?") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6852 (setq group (match-string 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6853 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6854 (error "Unknown news URL syntax")))) |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6855 (list scheme server port group message-id articles))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6856 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6857 (defun gnus-button-handle-news (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6858 "Fetch a news URL." |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6859 (destructuring-bind (scheme server port group message-id articles) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6860 (gnus-parse-news-url url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6861 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6862 (message-id |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6863 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6864 (set-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6865 (if server |
60239
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60215
diff
changeset
|
6866 (let ((gnus-refer-article-method |
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60215
diff
changeset
|
6867 (nconc (list (list 'nntp server)) |
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60215
diff
changeset
|
6868 gnus-refer-article-method)) |
60215
a2c5c861962a
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
6869 (nntp-port-number (or port "nntp"))) |
60239
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60215
diff
changeset
|
6870 (gnus-message 7 "Fetching %s with %s" |
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60215
diff
changeset
|
6871 message-id gnus-refer-article-method) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6872 (gnus-summary-refer-article message-id)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6873 (gnus-summary-refer-article message-id)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6874 (group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6875 (gnus-button-fetch-group url))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6876 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6877 (defun gnus-button-handle-man (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6878 "Fetch a man page." |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6879 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6880 (when (eq gnus-button-man-handler 'woman) |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6881 (setq url (gnus-replace-in-string url "([1-9][X1a-z]*).*\\'" ""))) |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57265
diff
changeset
|
6882 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6883 (funcall gnus-button-man-handler url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6884 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6885 (defun gnus-button-handle-info-url (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6886 "Fetch an info URL." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6887 (setq url (mm-subst-char-in-string ?+ ?\ url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6888 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6889 ((string-match "^\\([^:/]+\\)?/\\(.*\\)" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6890 (gnus-info-find-node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6891 (concat "(" (or (gnus-url-unhex-string (match-string 1 url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6892 "Gnus") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6893 ")" (gnus-url-unhex-string (match-string 2 url))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6894 ((string-match "([^)\"]+)[^\"]+" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6895 (setq url |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6896 (gnus-replace-in-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6897 (gnus-replace-in-string url "[\n\t ]+" " ") "\"" "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6898 (gnus-info-find-node url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6899 (t (error "Can't parse %s" url)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6900 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6901 (defun gnus-button-handle-info-url-gnome (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6902 "Fetch GNOME style info URL." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6903 (setq url (mm-subst-char-in-string ?_ ?\ url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6904 (if (string-match "\\([^#]+\\)#?\\(.*\\)" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6905 (gnus-info-find-node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6906 (concat "(" |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6907 (gnus-url-unhex-string |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6908 (match-string 1 url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6909 ")" |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59955
diff
changeset
|
6910 (or (gnus-url-unhex-string |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6911 (match-string 2 url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6912 "Top"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6913 (error "Can't parse %s" url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6914 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6915 (defun gnus-button-handle-info-url-kde (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6916 "Fetch KDE style info URL." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6917 (gnus-info-find-node (gnus-url-unhex-string url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6918 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6919 (defun gnus-button-handle-info-keystrokes (url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6920 "Call `info' when pushing the corresponding URL button." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6921 ;; For links like `C-h i d m gnus RET', `C-h i d m CC Mode RET'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6922 (info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6923 (Info-directory) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6924 (Info-menu url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6925 |
17493 | 6926 (defun gnus-button-message-id (message-id) |
6927 "Fetch MESSAGE-ID." | |
6928 (save-excursion | |
6929 (set-buffer gnus-summary-buffer) | |
6930 (gnus-summary-refer-article message-id))) | |
6931 | |
6932 (defun gnus-button-fetch-group (address) | |
6933 "Fetch GROUP specified by ADDRESS." | |
6934 (if (not (string-match "[:/]" address)) | |
6935 ;; This is just a simple group url. | |
6936 (gnus-group-read-ephemeral-group address gnus-select-method) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6937 (if (not |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6938 (string-match |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6939 "^\\([^:/]+\\)\\(:\\([^/]+\\)\\)?/\\([^/]+\\)\\(/\\([0-9]+\\)\\)?" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6940 address)) |
17493 | 6941 (error "Can't parse %s" address) |
6942 (gnus-group-read-ephemeral-group | |
6943 (match-string 4 address) | |
6944 `(nntp ,(match-string 1 address) | |
6945 (nntp-address ,(match-string 1 address)) | |
6946 (nntp-port-number ,(if (match-end 3) | |
6947 (match-string 3 address) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6948 "nntp"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6949 nil nil nil |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
62890
diff
changeset
|
6950 (and (match-end 6) (list (string-to-number (match-string 6 address)))))))) |
17493 | 6951 |
6952 (defun gnus-url-parse-query-string (query &optional downcase) | |
6953 (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
|
6954 (setq pairs (split-string query "&")) |
17493 | 6955 (while pairs |
6956 (setq cur (car pairs) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6957 pairs (cdr pairs)) |
17493 | 6958 (if (not (string-match "=" cur)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6959 nil ; Grace |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6960 (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6961 val (gnus-url-unhex-string (substring cur (match-end 0) nil) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6962 (if downcase |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6963 (setq key (downcase key))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6964 (setq cur (assoc key retval)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6965 (if cur |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6966 (setcdr cur (cons val (cdr cur))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6967 (setq retval (cons (list key val) retval))))) |
17493 | 6968 retval)) |
6969 | |
6970 (defun gnus-url-mailto (url) | |
6971 ;; Send mail to someone | |
6972 (when (string-match "mailto:/*\\(.*\\)" url) | |
6973 (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
|
6974 (let (to args subject func) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6975 (setq args (gnus-url-parse-query-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6976 (if (string-match "^\\?" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6977 (substring url 1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6978 (if (string-match "^\\([^?]+\\)\\?\\(.*\\)" url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6979 (concat "to=" (match-string 1 url) "&" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6980 (match-string 2 url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6981 (concat "to=" url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6982 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6983 subject (cdr-safe (assoc "subject" args))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6984 (gnus-msg-mail) |
17493 | 6985 (while args |
6986 (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) | |
6987 (if (fboundp func) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6988 (funcall func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6989 (message-position-on-field (caar args))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6990 (insert (gnus-replace-in-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6991 (mapconcat 'identity (reverse (cdar args)) ", ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6992 "\r\n" "\n" t)) |
17493 | 6993 (setq args (cdr args))) |
6994 (if subject | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
6995 (message-goto-body) |
17493 | 6996 (message-goto-subject)))) |
6997 | |
6998 (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
|
6999 "Activate ADDRESS with `browse-url'." |
23608
3805e63b8caf
(gnus-button-embedded-url, gnus-button-url):
Dave Love <fx@gnu.org>
parents:
23361
diff
changeset
|
7000 (browse-url (gnus-strip-whitespace address))) |
17493 | 7001 |
7002 ;;; Next/prev buttons in the article buffer. | |
7003 | |
7004 (defvar gnus-next-page-line-format "%{%(Next page...%)%}\n") | |
7005 (defvar gnus-prev-page-line-format "%{%(Previous page...%)%}\n") | |
7006 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7007 (defvar gnus-prev-page-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7008 (let ((map (make-sparse-keymap))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7009 (unless (>= emacs-major-version 21) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7010 ;; XEmacs doesn't care. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7011 (set-keymap-parent map gnus-article-mode-map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7012 (define-key map gnus-mouse-2 'gnus-button-prev-page) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7013 (define-key map "\r" 'gnus-button-prev-page) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7014 map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7015 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7016 (defvar gnus-next-page-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7017 (let ((map (make-sparse-keymap))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7018 (unless (>= emacs-major-version 21) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7019 ;; XEmacs doesn't care. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7020 (set-keymap-parent map gnus-article-mode-map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7021 (define-key map gnus-mouse-2 'gnus-button-next-page) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7022 (define-key map "\r" 'gnus-button-next-page) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7023 map)) |
17493 | 7024 |
7025 (defun gnus-insert-prev-page-button () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7026 (let ((b (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7027 (inhibit-read-only t)) |
17493 | 7028 (gnus-eval-format |
7029 gnus-prev-page-line-format nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7030 `(,@(gnus-local-map-property gnus-prev-page-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7031 gnus-prev t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7032 gnus-callback gnus-article-button-prev-page |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7033 article-type annotation)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7034 (widget-convert-button |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7035 'link b (if (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7036 ;; Exclude a newline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7037 (1- (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7038 (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7039 :action 'gnus-button-prev-page |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7040 :button-keymap gnus-prev-page-map))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7041 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7042 (defun gnus-button-next-page (&optional args more-args) |
17493 | 7043 "Go to the next page." |
7044 (interactive) | |
7045 (let ((win (selected-window))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7046 (select-window (gnus-get-buffer-window gnus-article-buffer t)) |
17493 | 7047 (gnus-article-next-page) |
7048 (select-window win))) | |
7049 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7050 (defun gnus-button-prev-page (&optional args more-args) |
17493 | 7051 "Go to the prev page." |
7052 (interactive) | |
7053 (let ((win (selected-window))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7054 (select-window (gnus-get-buffer-window gnus-article-buffer t)) |
17493 | 7055 (gnus-article-prev-page) |
7056 (select-window win))) | |
7057 | |
7058 (defun gnus-insert-next-page-button () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7059 (let ((b (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7060 (inhibit-read-only t)) |
17493 | 7061 (gnus-eval-format gnus-next-page-line-format nil |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7062 `(,@(gnus-local-map-property gnus-next-page-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7063 gnus-next t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7064 gnus-callback gnus-article-button-next-page |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7065 article-type annotation)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7066 (widget-convert-button |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7067 'link b (if (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7068 ;; Exclude a newline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7069 (1- (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7070 (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7071 :action 'gnus-button-next-page |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7072 :button-keymap gnus-next-page-map))) |
17493 | 7073 |
7074 (defun gnus-article-button-next-page (arg) | |
7075 "Go to the next page." | |
7076 (interactive "P") | |
7077 (let ((win (selected-window))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7078 (select-window (gnus-get-buffer-window gnus-article-buffer t)) |
17493 | 7079 (gnus-article-next-page) |
7080 (select-window win))) | |
7081 | |
7082 (defun gnus-article-button-prev-page (arg) | |
7083 "Go to the prev page." | |
7084 (interactive "P") | |
7085 (let ((win (selected-window))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7086 (select-window (gnus-get-buffer-window gnus-article-buffer t)) |
17493 | 7087 (gnus-article-prev-page) |
7088 (select-window win))) | |
7089 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7090 (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
|
7091 '(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
|
7092 "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
|
7093 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7094 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
|
7095 is FUNCTION, FUNCTION will be applied to all newsgroups. If item is a |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7096 \(REGEXP . FUNCTION), FUNCTION will be only apply to the newsgroups |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7097 whose names match REGEXP. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7098 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7099 For example: |
48588 | 7100 \((\"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
|
7101 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
|
7102 (\"chinese\" . rfc1843-decode-region)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7103 ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7104 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7105 (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
|
7106 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7107 (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
|
7108 "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
|
7109 (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
|
7110 (eq gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7111 (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
|
7112 (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
|
7113 (mapcar (lambda (x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7114 (if (symbolp x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7115 (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
|
7116 (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
|
7117 (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
|
7118 (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
|
7119 (list (cdr x)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7120 gnus-decode-header-methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7121 (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
|
7122 (pop xlist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7123 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7124 (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
|
7125 (while xlist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7126 (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
|
7127 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7128 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7129 ;;; Treatment top-level handling. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7130 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7131 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7132 (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
|
7133 (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
|
7134 (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
|
7135 (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
|
7136 (treated-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7137 (or (not type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7138 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7139 (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
|
7140 (while list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7141 (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
|
7142 (throw 'found t))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7143 (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
|
7144 val elem) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7145 (gnus-run-hooks 'gnus-part-display-hook) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7146 (dolist (elem alist) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7147 (setq val |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7148 (save-excursion |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7149 (when (gnus-buffer-live-p gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7150 (set-buffer gnus-summary-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7151 (symbol-value (car elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7152 (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
|
7153 treated-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7154 (gnus-treat-predicate val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7155 (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
|
7156 highlightp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7157 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7158 (funcall (cadr elem))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7159 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7160 ;; Dynamic variables. |
32993
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7161 (eval-when-compile |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7162 (defvar part-number) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7163 (defvar total-parts) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7164 (defvar type) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7165 (defvar condition) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7166 (defvar length)) |
ce95094f21e7
2000-10-27 John Wiegley <johnw@gnu.org>
Dave Love <fx@gnu.org>
parents:
32939
diff
changeset
|
7167 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7168 (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
|
7169 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7170 ((null val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7171 nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7172 (condition |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7173 (eq condition val)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7174 ((and (listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7175 (stringp (car val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7176 (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
|
7177 (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
|
7178 val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7179 ((listp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7180 (let ((pred (pop val))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7181 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7182 ((eq pred 'or) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7183 (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
|
7184 ((eq pred 'and) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7185 (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
|
7186 ((eq pred 'not) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7187 (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
|
7188 ((eq pred 'typep) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7189 (equal (car val) type)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7190 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7191 (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
|
7192 ((eq val t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7193 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7194 ((eq val 'head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7195 nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7196 ((eq val 'last) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7197 (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
|
7198 ((numberp val) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7199 (< length val)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7200 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
25382
diff
changeset
|
7201 (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
|
7202 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7203 (defun gnus-article-encrypt-body (protocol &optional n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7204 "Encrypt the article body." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7205 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7206 (list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7207 (or gnus-article-encrypt-protocol |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7208 (completing-read "Encrypt protocol: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7209 gnus-article-encrypt-protocol-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7210 nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7211 current-prefix-arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7212 (let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7213 (unless func |
63491
eb8609914b2b
(gnus-article-encrypt-body): Don't use `format' on `error' arguments.
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
7214 (error "Can't find the encrypt protocol %s" protocol)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7215 (if (member gnus-newsgroup-name '("nndraft:delayed" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7216 "nndraft:drafts" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7217 "nndraft:queue")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7218 (error "Can't encrypt the article in group %s" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7219 gnus-newsgroup-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7220 (gnus-summary-iterate n |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7221 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7222 (set-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7223 (let ((mail-parse-charset gnus-newsgroup-charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7224 (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7225 (summary-buffer gnus-summary-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7226 references point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7227 (gnus-set-global-variables) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7228 (when (gnus-group-read-only-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7229 (error "The current newsgroup does not support article encrypt")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7230 (gnus-summary-show-article t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7231 (setq references |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7232 (or (mail-header-references gnus-current-headers) "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7233 (set-buffer gnus-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7234 (let* ((inhibit-read-only t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7235 (headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7236 (mapcar (lambda (field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7237 (and (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7238 (message-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7239 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7240 (search-forward field nil t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7241 (prog2 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7242 (message-narrow-to-field) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7243 (buffer-string) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7244 (delete-region (point-min) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7245 (widen)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7246 '("Content-Type:" "Content-Transfer-Encoding:" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7247 "Content-Disposition:")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7248 (message-narrow-to-head) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7249 (message-remove-header "MIME-Version") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7250 (goto-char (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7251 (setq point (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7252 (insert (apply 'concat headers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7253 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7254 (narrow-to-region point (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7255 (let ((message-options message-options)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7256 (message-options-set 'message-sender user-mail-address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7257 (message-options-set 'message-recipients user-mail-address) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7258 (message-options-set 'message-sign-encrypt 'not) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7259 (funcall func)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7260 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7261 (insert "MIME-Version: 1.0\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7262 (widen) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7263 (gnus-summary-edit-article-done |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7264 references nil summary-buffer t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7265 (when gnus-keep-backlog |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7266 (gnus-backlog-remove-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7267 (car gnus-article-current) (cdr gnus-article-current))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7268 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7269 (when (get-buffer gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7270 (set-buffer gnus-original-article-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7271 (setq gnus-original-article nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7272 (when gnus-use-cache |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7273 (gnus-cache-update-article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7274 (car gnus-article-current) (cdr gnus-article-current)))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7275 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7276 (defvar gnus-mime-security-button-line-format "%{%([[%t:%i]%D]%)%}\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7277 "The following specs can be used: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7278 %t The security MIME type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7279 %i Additional info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7280 %d Details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7281 %D Details if button is pressed") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7282 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7283 (defvar gnus-mime-security-button-end-line-format "%{%([[End of %t]%D]%)%}\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7284 "The following specs can be used: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7285 %t The security MIME type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7286 %i Additional info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7287 %d Details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7288 %D Details if button is pressed") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7289 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7290 (defvar gnus-mime-security-button-line-format-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7291 '((?t gnus-tmp-type ?s) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7292 (?i gnus-tmp-info ?s) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7293 (?d gnus-tmp-details ?s) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7294 (?D gnus-tmp-pressed-details ?s))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7295 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7296 (defvar gnus-mime-security-button-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7297 (let ((map (make-sparse-keymap))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7298 (unless (>= (string-to-number emacs-version) 21) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7299 (set-keymap-parent map gnus-article-mode-map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7300 (define-key map gnus-mouse-2 'gnus-article-push-button) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7301 (define-key map "\r" 'gnus-article-press-button) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7302 map)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7303 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7304 (defvar gnus-mime-security-details-buffer nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7305 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7306 (defvar gnus-mime-security-button-pressed nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7307 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7308 (defvar gnus-mime-security-show-details-inline t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7309 "If non-nil, show details in the article buffer.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7310 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7311 (defun gnus-mime-security-verify-or-decrypt (handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7312 (mm-remove-parts (cdr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7313 (let ((region (mm-handle-multipart-ctl-parameter handle 'gnus-region)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7314 point (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7315 (if region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7316 (goto-char (car region))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7317 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7318 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7319 (with-current-buffer (mm-handle-multipart-original-buffer handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7320 (let* ((mm-verify-option 'known) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7321 (mm-decrypt-option 'known) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7322 (nparts (mm-possibly-verify-or-decrypt (cdr handle) handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7323 (unless (eq nparts (cdr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7324 (mm-destroy-parts (cdr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7325 (setcdr handle nparts)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7326 (setq point (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7327 (gnus-mime-display-security handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7328 (goto-char (point-max))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7329 (when region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7330 (delete-region (point) (cdr region)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7331 (set-marker (car region) nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7332 (set-marker (cdr region) nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7333 (goto-char point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7334 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7335 (defun gnus-mime-security-show-details (handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7336 (let ((details (mm-handle-multipart-ctl-parameter handle 'gnus-details))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7337 (if (not details) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7338 (gnus-message 5 "No details.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7339 (if gnus-mime-security-show-details-inline |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7340 (let ((gnus-mime-security-button-pressed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7341 (not (get-text-property (point) 'gnus-mime-details))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7342 (gnus-mime-security-button-line-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7343 (get-text-property (point) 'gnus-line-format)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7344 (inhibit-read-only t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7345 (forward-char -1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7346 (while (eq (get-text-property (point) 'gnus-line-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7347 gnus-mime-security-button-line-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7348 (forward-char -1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7349 (forward-char) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7350 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7351 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7352 (gnus-insert-mime-security-button handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7353 (delete-region (point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7354 (or (text-property-not-all |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7355 (point) (point-max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7356 'gnus-line-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7357 gnus-mime-security-button-line-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7358 (point-max)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7359 ;; Not inlined. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7360 (if (gnus-buffer-live-p gnus-mime-security-details-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7361 (with-current-buffer gnus-mime-security-details-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7362 (erase-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7363 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7364 (setq gnus-mime-security-details-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7365 (gnus-get-buffer-create "*MIME Security Details*"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7366 (with-current-buffer gnus-mime-security-details-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7367 (insert details) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7368 (goto-char (point-min))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7369 (pop-to-buffer gnus-mime-security-details-buffer))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7370 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7371 (defun gnus-mime-security-press-button (handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7372 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7373 (if (mm-handle-multipart-ctl-parameter handle 'gnus-info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7374 (gnus-mime-security-show-details handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7375 (gnus-mime-security-verify-or-decrypt handle)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7376 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7377 (defun gnus-insert-mime-security-button (handle &optional displayed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7378 (let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7379 (gnus-tmp-type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7380 (concat |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7381 (or (nth 2 (assoc protocol mm-verify-function-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7382 (nth 2 (assoc protocol mm-decrypt-function-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7383 "Unknown") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7384 (if (equal (car handle) "multipart/signed") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7385 " Signed" " Encrypted") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7386 " Part")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7387 (gnus-tmp-info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7388 (or (mm-handle-multipart-ctl-parameter handle 'gnus-info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7389 "Undecided")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7390 (gnus-tmp-details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7391 (mm-handle-multipart-ctl-parameter handle 'gnus-details)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7392 gnus-tmp-pressed-details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7393 b e) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7394 (setq gnus-tmp-details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7395 (if gnus-tmp-details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7396 (concat "\n" gnus-tmp-details) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7397 "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7398 (setq gnus-tmp-pressed-details |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7399 (if gnus-mime-security-button-pressed gnus-tmp-details "")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7400 (unless (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7401 (insert "\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7402 (setq b (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7403 (gnus-eval-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7404 gnus-mime-security-button-line-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7405 gnus-mime-security-button-line-format-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7406 `(,@(gnus-local-map-property gnus-mime-security-button-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7407 gnus-callback gnus-mime-security-press-button |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7408 gnus-line-format ,gnus-mime-security-button-line-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7409 gnus-mime-details ,gnus-mime-security-button-pressed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7410 article-type annotation |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7411 gnus-data ,handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7412 (setq e (if (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7413 ;; Exclude a newline. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7414 (1- (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7415 (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7416 (widget-convert-button |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7417 'link b e |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7418 :mime-handle handle |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7419 :action 'gnus-widget-press-button |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7420 :button-keymap gnus-mime-security-button-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7421 :help-echo |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7422 (lambda (widget/window &optional overlay pos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7423 ;; Needed to properly clear the message due to a bug in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7424 ;; wid-edit (XEmacs only). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7425 (when (boundp 'help-echo-owns-message) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7426 (setq help-echo-owns-message t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7427 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7428 "%S: show detail" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7429 (aref gnus-mouse-2 0)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7430 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7431 (defun gnus-mime-display-security (handle) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7432 (save-restriction |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7433 (narrow-to-region (point) (point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7434 (unless (gnus-unbuttonized-mime-type-p (car handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7435 (gnus-insert-mime-security-button handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7436 (gnus-mime-display-mixed (cdr handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7437 (unless (bolp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7438 (insert "\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7439 (unless (gnus-unbuttonized-mime-type-p (car handle)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7440 (let ((gnus-mime-security-button-line-format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7441 gnus-mime-security-button-end-line-format)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7442 (gnus-insert-mime-security-button handle))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7443 (mm-set-handle-multipart-parameter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7444 handle 'gnus-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7445 (cons (set-marker (make-marker) (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7446 (set-marker (make-marker) (point-max)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
54492
diff
changeset
|
7447 |
17493 | 7448 (gnus-ems-redefine) |
7449 | |
7450 (provide 'gnus-art) | |
7451 | |
7452 (run-hooks 'gnus-art-load-hook) | |
7453 | |
52401 | 7454 ;;; arch-tag: 2654516f-6279-48f9-a83b-05c1fa450c33 |
17493 | 7455 ;;; gnus-art.el ends here |