Fix author info.
[gnus] / lisp / gnus.el
1 ;;; gnus.el --- a newsreader for GNU Emacs
2
3 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998,
4 ;;   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5
6 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7 ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; Keywords: news, mail
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
26
27 ;;; Commentary:
28
29 ;;; Code:
30
31 (eval '(run-hooks 'gnus-load-hook))
32
33 (eval-when-compile (require 'cl))
34 (require 'wid-edit)
35 (require 'mm-util)
36 (require 'nnheader)
37
38 ;; These are defined afterwards with gnus-define-group-parameter
39 (defvar gnus-ham-process-destinations)
40 (defvar gnus-parameter-ham-marks-alist)
41 (defvar gnus-parameter-spam-marks-alist)
42 (defvar gnus-spam-autodetect)
43 (defvar gnus-spam-autodetect-methods)
44 (defvar gnus-spam-newsgroup-contents)
45 (defvar gnus-spam-process-destinations)
46 (defvar gnus-spam-process-newsgroups)
47
48
49 (defgroup gnus nil
50   "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
51   :group 'news
52   :group 'mail)
53
54 (defgroup gnus-format nil
55   "Dealing with formatting issues."
56   :group 'gnus)
57
58 (defgroup gnus-charset nil
59   "Group character set issues."
60   :link '(custom-manual "(gnus)Charsets")
61   :version "21.1"
62   :group 'gnus)
63
64 (defgroup gnus-cache nil
65   "Cache interface."
66   :link '(custom-manual "(gnus)Article Caching")
67   :group 'gnus)
68
69 (defgroup gnus-registry nil
70   "Article Registry."
71   :group 'gnus)
72
73 (defgroup gnus-start nil
74   "Starting your favorite newsreader."
75   :group 'gnus)
76
77 (defgroup gnus-start-server nil
78   "Server options at startup."
79   :group 'gnus-start)
80
81 ;; These belong to gnus-group.el.
82 (defgroup gnus-group nil
83   "Group buffers."
84   :link '(custom-manual "(gnus)Group Buffer")
85   :group 'gnus)
86
87 (defgroup gnus-group-foreign nil
88   "Foreign groups."
89   :link '(custom-manual "(gnus)Foreign Groups")
90   :group 'gnus-group)
91
92 (defgroup gnus-group-new nil
93   "Automatic subscription of new groups."
94   :group 'gnus-group)
95
96 (defgroup gnus-group-levels nil
97   "Group levels."
98   :link '(custom-manual "(gnus)Group Levels")
99   :group 'gnus-group)
100
101 (defgroup gnus-group-select nil
102   "Selecting a Group."
103   :link '(custom-manual "(gnus)Selecting a Group")
104   :group 'gnus-group)
105
106 (defgroup gnus-group-listing nil
107   "Showing slices of the group list."
108   :link '(custom-manual "(gnus)Listing Groups")
109   :group 'gnus-group)
110
111 (defgroup gnus-group-visual nil
112   "Sorting the group buffer."
113   :link '(custom-manual "(gnus)Group Buffer Format")
114   :group 'gnus-group
115   :group 'gnus-visual)
116
117 (defgroup gnus-group-various nil
118   "Various group options."
119   :link '(custom-manual "(gnus)Scanning New Messages")
120   :group 'gnus-group)
121
122 ;; These belong to gnus-sum.el.
123 (defgroup gnus-summary nil
124   "Summary buffers."
125   :link '(custom-manual "(gnus)Summary Buffer")
126   :group 'gnus)
127
128 (defgroup gnus-summary-exit nil
129   "Leaving summary buffers."
130   :link '(custom-manual "(gnus)Exiting the Summary Buffer")
131   :group 'gnus-summary)
132
133 (defgroup gnus-summary-marks nil
134   "Marks used in summary buffers."
135   :link '(custom-manual "(gnus)Marking Articles")
136   :group 'gnus-summary)
137
138 (defgroup gnus-thread nil
139   "Ordering articles according to replies."
140   :link '(custom-manual "(gnus)Threading")
141   :group 'gnus-summary)
142
143 (defgroup gnus-summary-format nil
144   "Formatting of the summary buffer."
145   :link '(custom-manual "(gnus)Summary Buffer Format")
146   :group 'gnus-summary)
147
148 (defgroup gnus-summary-choose nil
149   "Choosing Articles."
150   :link '(custom-manual "(gnus)Choosing Articles")
151   :group 'gnus-summary)
152
153 (defgroup gnus-summary-maneuvering nil
154   "Summary movement commands."
155   :link '(custom-manual "(gnus)Summary Maneuvering")
156   :group 'gnus-summary)
157
158 (defgroup gnus-picon nil
159   "Show pictures of people, domains, and newsgroups."
160   :group 'gnus-visual)
161
162 (defgroup gnus-summary-mail nil
163   "Mail group commands."
164   :link '(custom-manual "(gnus)Mail Group Commands")
165   :group 'gnus-summary)
166
167 (defgroup gnus-summary-sort nil
168   "Sorting the summary buffer."
169   :link '(custom-manual "(gnus)Sorting the Summary Buffer")
170   :group 'gnus-summary)
171
172 (defgroup gnus-summary-visual nil
173   "Highlighting and menus in the summary buffer."
174   :link '(custom-manual "(gnus)Summary Highlighting")
175   :group 'gnus-visual
176   :group 'gnus-summary)
177
178 (defgroup gnus-summary-various nil
179   "Various summary buffer options."
180   :link '(custom-manual "(gnus)Various Summary Stuff")
181   :group 'gnus-summary)
182
183 (defgroup gnus-summary-pick nil
184   "Pick mode in the summary buffer."
185   :link '(custom-manual "(gnus)Pick and Read")
186   :prefix "gnus-pick-"
187   :group 'gnus-summary)
188
189 (defgroup gnus-summary-tree nil
190   "Tree display of threads in the summary buffer."
191   :link '(custom-manual "(gnus)Tree Display")
192   :prefix "gnus-tree-"
193   :group 'gnus-summary)
194
195 ;; Belongs to gnus-uu.el
196 (defgroup gnus-extract-view nil
197   "Viewing extracted files."
198   :link '(custom-manual "(gnus)Viewing Files")
199   :group 'gnus-extract)
200
201 ;; Belongs to gnus-score.el
202 (defgroup gnus-score nil
203   "Score and kill file handling."
204   :group 'gnus)
205
206 (defgroup gnus-score-kill nil
207   "Kill files."
208   :group 'gnus-score)
209
210 (defgroup gnus-score-adapt nil
211   "Adaptive score files."
212   :group 'gnus-score)
213
214 (defgroup gnus-score-default nil
215   "Default values for score files."
216   :group 'gnus-score)
217
218 (defgroup gnus-score-expire nil
219   "Expiring score rules."
220   :group 'gnus-score)
221
222 (defgroup gnus-score-decay nil
223   "Decaying score rules."
224   :group 'gnus-score)
225
226 (defgroup gnus-score-files nil
227   "Score and kill file names."
228   :group 'gnus-score
229   :group 'gnus-files)
230
231 (defgroup gnus-score-various nil
232   "Various scoring and killing options."
233   :group 'gnus-score)
234
235 ;; Other
236 (defgroup gnus-visual nil
237   "Options controlling the visual fluff."
238   :group 'gnus
239   :group 'faces)
240
241 (defgroup gnus-agent nil
242   "Offline support for Gnus."
243   :group 'gnus)
244
245 (defgroup gnus-files nil
246   "Files used by Gnus."
247   :group 'gnus)
248
249 (defgroup gnus-dribble-file nil
250   "Auto save file."
251   :link '(custom-manual "(gnus)Auto Save")
252   :group 'gnus-files)
253
254 (defgroup gnus-newsrc nil
255   "Storing Gnus state."
256   :group 'gnus-files)
257
258 (defgroup gnus-server nil
259   "Options related to newsservers and other servers used by Gnus."
260   :group 'gnus)
261
262 (defgroup gnus-server-visual nil
263   "Highlighting and menus in the server buffer."
264   :group 'gnus-visual
265   :group 'gnus-server)
266
267 (defgroup gnus-message '((message custom-group))
268   "Composing replies and followups in Gnus."
269   :group 'gnus)
270
271 (defgroup gnus-meta nil
272   "Meta variables controlling major portions of Gnus.
273 In general, modifying these variables does not take affect until Gnus
274 is restarted, and sometimes reloaded."
275   :group 'gnus)
276
277 (defgroup gnus-various nil
278   "Other Gnus options."
279   :link '(custom-manual "(gnus)Various Various")
280   :group 'gnus)
281
282 (defgroup gnus-mime nil
283   "Variables for controlling the Gnus MIME interface."
284   :group 'gnus)
285
286 (defgroup gnus-exit nil
287   "Exiting Gnus."
288   :link '(custom-manual "(gnus)Exiting Gnus")
289   :group 'gnus)
290
291 (defgroup gnus-fun nil
292   "Frivolous Gnus extensions."
293   :link '(custom-manual "(gnus)Exiting Gnus")
294   :group 'gnus)
295
296 (defconst gnus-version-number "0.4"
297   "Version number for this version of Gnus.")
298
299 (defconst gnus-version (format "No Gnus v%s" gnus-version-number)
300   "Version string for this version of Gnus.")
301
302 (defcustom gnus-inhibit-startup-message nil
303   "If non-nil, the startup message will not be displayed.
304 This variable is used before `.gnus.el' is loaded, so it should
305 be set in `.emacs' instead."
306   :group 'gnus-start
307   :type 'boolean)
308
309 (defcustom gnus-play-startup-jingle nil
310   "If non-nil, play the Gnus jingle at startup."
311   :group 'gnus-start
312   :type 'boolean)
313
314 (unless (fboundp 'gnus-group-remove-excess-properties)
315   (defalias 'gnus-group-remove-excess-properties 'ignore))
316
317 (unless (featurep 'gnus-xmas)
318   (defalias 'gnus-make-overlay 'make-overlay)
319   (defalias 'gnus-delete-overlay 'delete-overlay)
320   (defalias 'gnus-overlay-put 'overlay-put)
321   (defalias 'gnus-move-overlay 'move-overlay)
322   (defalias 'gnus-overlay-buffer 'overlay-buffer)
323   (defalias 'gnus-overlay-start 'overlay-start)
324   (defalias 'gnus-overlay-end 'overlay-end)
325   (defalias 'gnus-extent-detached-p 'ignore)
326   (defalias 'gnus-extent-start-open 'ignore)
327   (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
328   (defalias 'gnus-character-to-event 'identity)
329   (defalias 'gnus-assq-delete-all 'assq-delete-all)
330   (defalias 'gnus-add-text-properties 'add-text-properties)
331   (defalias 'gnus-put-text-property 'put-text-property)
332   (defvar gnus-mode-line-image-cache t)
333   (if (fboundp 'find-image)
334       (defun gnus-mode-line-buffer-identification (line)
335         (let ((str (car-safe line))
336               (load-path (mm-image-load-path)))
337           (if (and (stringp str)
338                    (string-match "^Gnus:" str))
339               (progn (add-text-properties
340                       0 5
341                       (list 'display
342                             (if (eq t gnus-mode-line-image-cache)
343                                 (setq gnus-mode-line-image-cache
344                                       (find-image
345                                        '((:type xpm :file "gnus-pointer.xpm"
346                                                 :ascent center)
347                                          (:type xbm :file "gnus-pointer.xbm"
348                                                 :ascent center))))
349                               gnus-mode-line-image-cache)
350                             'help-echo (format
351                                         "This is %s, %s."
352                                         gnus-version (gnus-emacs-version)))
353                       str)
354                      (list str))
355             line)))
356     (defalias 'gnus-mode-line-buffer-identification 'identity))
357   (defalias 'gnus-characterp 'numberp)
358   (defalias 'gnus-deactivate-mark 'deactivate-mark)
359   (defalias 'gnus-window-edges 'window-edges)
360   (defalias 'gnus-key-press-event-p 'numberp)
361   ;;(defalias 'gnus-decode-rfc1522 'ignore)
362   )
363
364 ;; We define these group faces here to avoid the display
365 ;; update forced when creating new faces.
366
367 (defface gnus-group-news-1
368   '((((class color)
369       (background dark))
370      (:foreground "PaleTurquoise" :bold t))
371     (((class color)
372       (background light))
373      (:foreground "ForestGreen" :bold t))
374     (t
375      ()))
376   "Level 1 newsgroup face."
377   :group 'gnus-group)
378 ;; backward-compatibility alias
379 (put 'gnus-group-news-1-face 'face-alias 'gnus-group-news-1)
380
381 (defface gnus-group-news-1-empty
382   '((((class color)
383       (background dark))
384      (:foreground "PaleTurquoise"))
385     (((class color)
386       (background light))
387      (:foreground "ForestGreen"))
388     (t
389      ()))
390   "Level 1 empty newsgroup face."
391   :group 'gnus-group)
392 ;; backward-compatibility alias
393 (put 'gnus-group-news-1-empty-face 'face-alias 'gnus-group-news-1-empty)
394
395 (defface gnus-group-news-2
396   '((((class color)
397       (background dark))
398      (:foreground "turquoise" :bold t))
399     (((class color)
400       (background light))
401      (:foreground "CadetBlue4" :bold t))
402     (t
403      ()))
404   "Level 2 newsgroup face."
405   :group 'gnus-group)
406 ;; backward-compatibility alias
407 (put 'gnus-group-news-2-face 'face-alias 'gnus-group-news-2)
408
409 (defface gnus-group-news-2-empty
410   '((((class color)
411       (background dark))
412      (:foreground "turquoise"))
413     (((class color)
414       (background light))
415      (:foreground "CadetBlue4"))
416     (t
417      ()))
418   "Level 2 empty newsgroup face."
419   :group 'gnus-group)
420 ;; backward-compatibility alias
421 (put 'gnus-group-news-2-empty-face 'face-alias 'gnus-group-news-2-empty)
422
423 (defface gnus-group-news-3
424   '((((class color)
425       (background dark))
426      (:bold t))
427     (((class color)
428       (background light))
429      (:bold t))
430     (t
431      ()))
432   "Level 3 newsgroup face."
433   :group 'gnus-group)
434 ;; backward-compatibility alias
435 (put 'gnus-group-news-3-face 'face-alias 'gnus-group-news-3)
436
437 (defface gnus-group-news-3-empty
438   '((((class color)
439       (background dark))
440      ())
441     (((class color)
442       (background light))
443      ())
444     (t
445      ()))
446   "Level 3 empty newsgroup face."
447   :group 'gnus-group)
448 ;; backward-compatibility alias
449 (put 'gnus-group-news-3-empty-face 'face-alias 'gnus-group-news-3-empty)
450
451 (defface gnus-group-news-4
452   '((((class color)
453       (background dark))
454      (:bold t))
455     (((class color)
456       (background light))
457      (:bold t))
458     (t
459      ()))
460   "Level 4 newsgroup face."
461   :group 'gnus-group)
462 ;; backward-compatibility alias
463 (put 'gnus-group-news-4-face 'face-alias 'gnus-group-news-4)
464
465 (defface gnus-group-news-4-empty
466   '((((class color)
467       (background dark))
468      ())
469     (((class color)
470       (background light))
471      ())
472     (t
473      ()))
474   "Level 4 empty newsgroup face."
475   :group 'gnus-group)
476 ;; backward-compatibility alias
477 (put 'gnus-group-news-4-empty-face 'face-alias 'gnus-group-news-4-empty)
478
479 (defface gnus-group-news-5
480   '((((class color)
481       (background dark))
482      (:bold t))
483     (((class color)
484       (background light))
485      (:bold t))
486     (t
487      ()))
488   "Level 5 newsgroup face."
489   :group 'gnus-group)
490 ;; backward-compatibility alias
491 (put 'gnus-group-news-5-face 'face-alias 'gnus-group-news-5)
492
493 (defface gnus-group-news-5-empty
494   '((((class color)
495       (background dark))
496      ())
497     (((class color)
498       (background light))
499      ())
500     (t
501      ()))
502   "Level 5 empty newsgroup face."
503   :group 'gnus-group)
504 ;; backward-compatibility alias
505 (put 'gnus-group-news-5-empty-face 'face-alias 'gnus-group-news-5-empty)
506
507 (defface gnus-group-news-6
508   '((((class color)
509       (background dark))
510      (:bold t))
511     (((class color)
512       (background light))
513      (:bold t))
514     (t
515      ()))
516   "Level 6 newsgroup face."
517   :group 'gnus-group)
518 ;; backward-compatibility alias
519 (put 'gnus-group-news-6-face 'face-alias 'gnus-group-news-6)
520
521 (defface gnus-group-news-6-empty
522   '((((class color)
523       (background dark))
524      ())
525     (((class color)
526       (background light))
527      ())
528     (t
529      ()))
530   "Level 6 empty newsgroup face."
531   :group 'gnus-group)
532 ;; backward-compatibility alias
533 (put 'gnus-group-news-6-empty-face 'face-alias 'gnus-group-news-6-empty)
534
535 (defface gnus-group-news-low
536   '((((class color)
537       (background dark))
538      (:foreground "DarkTurquoise" :bold t))
539     (((class color)
540       (background light))
541      (:foreground "DarkGreen" :bold t))
542     (t
543      ()))
544   "Low level newsgroup face."
545   :group 'gnus-group)
546 ;; backward-compatibility alias
547 (put 'gnus-group-news-low-face 'face-alias 'gnus-group-news-low)
548
549 (defface gnus-group-news-low-empty
550   '((((class color)
551       (background dark))
552      (:foreground "DarkTurquoise"))
553     (((class color)
554       (background light))
555      (:foreground "DarkGreen"))
556     (t
557      ()))
558   "Low level empty newsgroup face."
559   :group 'gnus-group)
560 ;; backward-compatibility alias
561 (put 'gnus-group-news-low-empty-face 'face-alias 'gnus-group-news-low-empty)
562
563 (defface gnus-group-mail-1
564   '((((class color)
565       (background dark))
566      (:foreground "aquamarine1" :bold t))
567     (((class color)
568       (background light))
569      (:foreground "DeepPink3" :bold t))
570     (t
571      (:bold t)))
572   "Level 1 mailgroup face."
573   :group 'gnus-group)
574 ;; backward-compatibility alias
575 (put 'gnus-group-mail-1-face 'face-alias 'gnus-group-mail-1)
576
577 (defface gnus-group-mail-1-empty
578   '((((class color)
579       (background dark))
580      (:foreground "aquamarine1"))
581     (((class color)
582       (background light))
583      (:foreground "DeepPink3"))
584     (t
585      (:italic t :bold t)))
586   "Level 1 empty mailgroup face."
587   :group 'gnus-group)
588 ;; backward-compatibility alias
589 (put 'gnus-group-mail-1-empty-face 'face-alias 'gnus-group-mail-1-empty)
590
591 (defface gnus-group-mail-2
592   '((((class color)
593       (background dark))
594      (:foreground "aquamarine2" :bold t))
595     (((class color)
596       (background light))
597      (:foreground "HotPink3" :bold t))
598     (t
599      (:bold t)))
600   "Level 2 mailgroup face."
601   :group 'gnus-group)
602 ;; backward-compatibility alias
603 (put 'gnus-group-mail-2-face 'face-alias 'gnus-group-mail-2)
604
605 (defface gnus-group-mail-2-empty
606   '((((class color)
607       (background dark))
608      (:foreground "aquamarine2"))
609     (((class color)
610       (background light))
611      (:foreground "HotPink3"))
612     (t
613      (:bold t)))
614   "Level 2 empty mailgroup face."
615   :group 'gnus-group)
616 ;; backward-compatibility alias
617 (put 'gnus-group-mail-2-empty-face 'face-alias 'gnus-group-mail-2-empty)
618
619 (defface gnus-group-mail-3
620   '((((class color)
621       (background dark))
622      (:foreground "aquamarine3" :bold t))
623     (((class color)
624       (background light))
625      (:foreground "magenta4" :bold t))
626     (t
627      (:bold t)))
628   "Level 3 mailgroup face."
629   :group 'gnus-group)
630 ;; backward-compatibility alias
631 (put 'gnus-group-mail-3-face 'face-alias 'gnus-group-mail-3)
632
633 (defface gnus-group-mail-3-empty
634   '((((class color)
635       (background dark))
636      (:foreground "aquamarine3"))
637     (((class color)
638       (background light))
639      (:foreground "magenta4"))
640     (t
641      ()))
642   "Level 3 empty mailgroup face."
643   :group 'gnus-group)
644 ;; backward-compatibility alias
645 (put 'gnus-group-mail-3-empty-face 'face-alias 'gnus-group-mail-3-empty)
646
647 (defface gnus-group-mail-low
648   '((((class color)
649       (background dark))
650      (:foreground "aquamarine4" :bold t))
651     (((class color)
652       (background light))
653      (:foreground "DeepPink4" :bold t))
654     (t
655      (:bold t)))
656   "Low level mailgroup face."
657   :group 'gnus-group)
658 ;; backward-compatibility alias
659 (put 'gnus-group-mail-low-face 'face-alias 'gnus-group-mail-low)
660
661 (defface gnus-group-mail-low-empty
662   '((((class color)
663       (background dark))
664      (:foreground "aquamarine4"))
665     (((class color)
666       (background light))
667      (:foreground "DeepPink4"))
668     (t
669      (:bold t)))
670   "Low level empty mailgroup face."
671   :group 'gnus-group)
672 ;; backward-compatibility alias
673 (put 'gnus-group-mail-low-empty-face 'face-alias 'gnus-group-mail-low-empty)
674
675 ;; Summary mode faces.
676
677 (defface gnus-summary-selected '((t (:underline t)))
678   "Face used for selected articles."
679   :group 'gnus-summary)
680 ;; backward-compatibility alias
681 (put 'gnus-summary-selected-face 'face-alias 'gnus-summary-selected)
682
683 (defface gnus-summary-cancelled
684   '((((class color))
685      (:foreground "yellow" :background "black")))
686   "Face used for cancelled articles."
687   :group 'gnus-summary)
688 ;; backward-compatibility alias
689 (put 'gnus-summary-cancelled-face 'face-alias 'gnus-summary-cancelled)
690
691 (defface gnus-summary-high-ticked
692   '((((class color)
693       (background dark))
694      (:foreground "pink" :bold t))
695     (((class color)
696       (background light))
697      (:foreground "firebrick" :bold t))
698     (t
699      (:bold t)))
700   "Face used for high interest ticked articles."
701   :group 'gnus-summary)
702 ;; backward-compatibility alias
703 (put 'gnus-summary-high-ticked-face 'face-alias 'gnus-summary-high-ticked)
704
705 (defface gnus-summary-low-ticked
706   '((((class color)
707       (background dark))
708      (:foreground "pink" :italic t))
709     (((class color)
710       (background light))
711      (:foreground "firebrick" :italic t))
712     (t
713      (:italic t)))
714   "Face used for low interest ticked articles."
715   :group 'gnus-summary)
716 ;; backward-compatibility alias
717 (put 'gnus-summary-low-ticked-face 'face-alias 'gnus-summary-low-ticked)
718
719 (defface gnus-summary-normal-ticked
720   '((((class color)
721       (background dark))
722      (:foreground "pink"))
723     (((class color)
724       (background light))
725      (:foreground "firebrick"))
726     (t
727      ()))
728   "Face used for normal interest ticked articles."
729   :group 'gnus-summary)
730 ;; backward-compatibility alias
731 (put 'gnus-summary-normal-ticked-face 'face-alias 'gnus-summary-normal-ticked)
732
733 (defface gnus-summary-high-ancient
734   '((((class color)
735       (background dark))
736      (:foreground "SkyBlue" :bold t))
737     (((class color)
738       (background light))
739      (:foreground "RoyalBlue" :bold t))
740     (t
741      (:bold t)))
742   "Face used for high interest ancient articles."
743   :group 'gnus-summary)
744 ;; backward-compatibility alias
745 (put 'gnus-summary-high-ancient-face 'face-alias 'gnus-summary-high-ancient)
746
747 (defface gnus-summary-low-ancient
748   '((((class color)
749       (background dark))
750      (:foreground "SkyBlue" :italic t))
751     (((class color)
752       (background light))
753      (:foreground "RoyalBlue" :italic t))
754     (t
755      (:italic t)))
756   "Face used for low interest ancient articles."
757   :group 'gnus-summary)
758 ;; backward-compatibility alias
759 (put 'gnus-summary-low-ancient-face 'face-alias 'gnus-summary-low-ancient)
760
761 (defface gnus-summary-normal-ancient
762   '((((class color)
763       (background dark))
764      (:foreground "SkyBlue"))
765     (((class color)
766       (background light))
767      (:foreground "RoyalBlue"))
768     (t
769      ()))
770   "Face used for normal interest ancient articles."
771   :group 'gnus-summary)
772 ;; backward-compatibility alias
773 (put 'gnus-summary-normal-ancient-face 'face-alias 'gnus-summary-normal-ancient)
774
775 (defface gnus-summary-high-undownloaded
776    '((((class color)
777        (background light))
778       (:bold t :foreground "cyan4"))
779      (((class color) (background dark))
780       (:bold t :foreground "LightGray"))
781      (t (:inverse-video t :bold t)))
782   "Face used for high interest uncached articles."
783   :group 'gnus-summary)
784 ;; backward-compatibility alias
785 (put 'gnus-summary-high-undownloaded-face 'face-alias 'gnus-summary-high-undownloaded)
786
787 (defface gnus-summary-low-undownloaded
788    '((((class color)
789        (background light))
790       (:italic t :foreground "cyan4" :bold nil))
791      (((class color) (background dark))
792       (:italic t :foreground "LightGray" :bold nil))
793      (t (:inverse-video t :italic t)))
794   "Face used for low interest uncached articles."
795   :group 'gnus-summary)
796 ;; backward-compatibility alias
797 (put 'gnus-summary-low-undownloaded-face 'face-alias 'gnus-summary-low-undownloaded)
798
799 (defface gnus-summary-normal-undownloaded
800    '((((class color)
801        (background light))
802       (:foreground "cyan4" :bold nil))
803      (((class color) (background dark))
804       (:foreground "LightGray" :bold nil))
805      (t (:inverse-video t)))
806   "Face used for normal interest uncached articles."
807   :group 'gnus-summary)
808 ;; backward-compatibility alias
809 (put 'gnus-summary-normal-undownloaded-face 'face-alias 'gnus-summary-normal-undownloaded)
810
811 (defface gnus-summary-high-unread
812   '((t
813      (:bold t)))
814   "Face used for high interest unread articles."
815   :group 'gnus-summary)
816 ;; backward-compatibility alias
817 (put 'gnus-summary-high-unread-face 'face-alias 'gnus-summary-high-unread)
818
819 (defface gnus-summary-low-unread
820   '((t
821      (:italic t)))
822   "Face used for low interest unread articles."
823   :group 'gnus-summary)
824 ;; backward-compatibility alias
825 (put 'gnus-summary-low-unread-face 'face-alias 'gnus-summary-low-unread)
826
827 (defface gnus-summary-normal-unread
828   '((t
829      ()))
830   "Face used for normal interest unread articles."
831   :group 'gnus-summary)
832 ;; backward-compatibility alias
833 (put 'gnus-summary-normal-unread-face 'face-alias 'gnus-summary-normal-unread)
834
835 (defface gnus-summary-high-read
836   '((((class color)
837       (background dark))
838      (:foreground "PaleGreen"
839                   :bold t))
840     (((class color)
841       (background light))
842      (:foreground "DarkGreen"
843                   :bold t))
844     (t
845      (:bold t)))
846   "Face used for high interest read articles."
847   :group 'gnus-summary)
848 ;; backward-compatibility alias
849 (put 'gnus-summary-high-read-face 'face-alias 'gnus-summary-high-read)
850
851 (defface gnus-summary-low-read
852   '((((class color)
853       (background dark))
854      (:foreground "PaleGreen"
855                   :italic t))
856     (((class color)
857       (background light))
858      (:foreground "DarkGreen"
859                   :italic t))
860     (t
861      (:italic t)))
862   "Face used for low interest read articles."
863   :group 'gnus-summary)
864 ;; backward-compatibility alias
865 (put 'gnus-summary-low-read-face 'face-alias 'gnus-summary-low-read)
866
867 (defface gnus-summary-normal-read
868   '((((class color)
869       (background dark))
870      (:foreground "PaleGreen"))
871     (((class color)
872       (background light))
873      (:foreground "DarkGreen"))
874     (t
875      ()))
876   "Face used for normal interest read articles."
877   :group 'gnus-summary)
878 ;; backward-compatibility alias
879 (put 'gnus-summary-normal-read-face 'face-alias 'gnus-summary-normal-read)
880
881
882 ;;;
883 ;;; Gnus buffers
884 ;;;
885
886 (defvar gnus-buffers nil)
887
888 (defun gnus-get-buffer-create (name)
889   "Do the same as `get-buffer-create', but store the created buffer."
890   (or (get-buffer name)
891       (car (push (get-buffer-create name) gnus-buffers))))
892
893 (defun gnus-add-buffer ()
894   "Add the current buffer to the list of Gnus buffers."
895   (push (current-buffer) gnus-buffers))
896
897 (defmacro gnus-kill-buffer (buffer)
898   "Kill BUFFER and remove from the list of Gnus buffers."
899   `(let ((buf ,buffer))
900      (when (gnus-buffer-exists-p buf)
901        (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
902        (kill-buffer buf))))
903
904 (defun gnus-buffers ()
905   "Return a list of live Gnus buffers."
906   (while (and gnus-buffers
907               (not (buffer-name (car gnus-buffers))))
908     (pop gnus-buffers))
909   (let ((buffers gnus-buffers))
910     (while (cdr buffers)
911       (if (buffer-name (cadr buffers))
912           (pop buffers)
913         (setcdr buffers (cddr buffers)))))
914   gnus-buffers)
915
916 ;;; Splash screen.
917
918 (defvar gnus-group-buffer "*Group*")
919
920 (eval-and-compile
921   (autoload 'gnus-play-jingle "gnus-audio"))
922
923 (defface gnus-splash
924   '((((class color)
925       (background dark))
926      (:foreground "#888888"))
927     (((class color)
928       (background light))
929      (:foreground "#888888"))
930     (t
931      ()))
932   "Face for the splash screen."
933   :group 'gnus-start)
934 ;; backward-compatibility alias
935 (put 'gnus-splash-face 'face-alias 'gnus-splash)
936
937 (defun gnus-splash ()
938   (save-excursion
939     (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer))
940     (let ((buffer-read-only nil))
941       (erase-buffer)
942       (unless gnus-inhibit-startup-message
943         (gnus-group-startup-message)
944         (sit-for 0)
945         (when gnus-play-startup-jingle
946           (gnus-play-jingle))))))
947
948 (defun gnus-indent-rigidly (start end arg)
949   "Indent rigidly using only spaces and no tabs."
950   (save-excursion
951     (save-restriction
952       (narrow-to-region start end)
953       (let ((tab-width 8))
954         (indent-rigidly start end arg)
955         ;; We translate tabs into spaces -- not everybody uses
956         ;; an 8-character tab.
957         (goto-char (point-min))
958         (while (search-forward "\t" nil t)
959           (replace-match "        " t t))))))
960
961 (defvar gnus-simple-splash nil)
962
963 ;;(format "%02x%02x%02x" 114 66 20) "724214"
964
965 (defvar gnus-logo-color-alist
966   '((flame "#cc3300" "#ff2200")
967     (pine "#c0cc93" "#f8ffb8")
968     (moss "#a1cc93" "#d2ffb8")
969     (irish "#04cc90" "#05ff97")
970     (sky "#049acc" "#05deff")
971     (tin "#6886cc" "#82b6ff")
972     (velvet "#7c68cc" "#8c82ff")
973     (grape "#b264cc" "#cf7df")
974     (labia "#cc64c2" "#fd7dff")
975     (berry "#cc6485" "#ff7db5")
976     (dino "#724214" "#1e3f03")
977     (oort "#cccccc" "#888888")
978     (storm "#666699" "#99ccff")
979     (pdino "#9999cc" "#99ccff")
980     (purp "#9999cc" "#666699")
981     (no "#ff0000" "#ffff00")
982     (neutral "#b4b4b4" "#878787")
983     (september "#bf9900" "#ffcc00"))
984   "Color alist used for the Gnus logo.")
985
986 (defcustom gnus-logo-color-style 'no
987   "*Color styles used for the Gnus logo."
988   :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
989                            gnus-logo-color-alist))
990   :group 'gnus-xmas)
991
992 (defvar gnus-logo-colors
993   (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
994   "Colors used for the Gnus logo.")
995
996 (defun gnus-group-startup-message (&optional x y)
997   "Insert startup message in current buffer."
998   ;; Insert the message.
999   (erase-buffer)
1000   (cond
1001    ((and
1002      (fboundp 'find-image)
1003      (display-graphic-p)
1004      (let* ((data-directory (nnheader-find-etc-directory "images/gnus"))
1005             (image-load-path (cond (data-directory
1006                                     (list data-directory))
1007                                    ((boundp 'image-load-path)
1008                                     (symbol-value 'image-load-path))
1009                                    (t load-path)))
1010             (image (find-image
1011                     `((:type xpm :file "gnus.xpm"
1012                              :color-symbols
1013                              (("thing" . ,(car gnus-logo-colors))
1014                               ("shadow" . ,(cadr gnus-logo-colors))
1015                               ("oort" . "#eeeeee")
1016                               ("background" . ,(face-background 'default))))
1017                       (:type pbm :file "gnus.pbm"
1018                              ;; Account for the pbm's blackground.
1019                              :background ,(face-foreground 'gnus-splash)
1020                              :foreground ,(face-background 'default))
1021                       (:type xbm :file "gnus.xbm"
1022                              ;; Account for the xbm's blackground.
1023                              :background ,(face-foreground 'gnus-splash)
1024                              :foreground ,(face-background 'default))))))
1025        (when image
1026          (let ((size (image-size image)))
1027            (insert-char ?\n (max 0 (round (- (window-height)
1028                                              (or y (cdr size)) 1) 2)))
1029            (insert-char ?\  (max 0 (round (- (window-width)
1030                                              (or x (car size))) 2)))
1031            (insert-image image))
1032          (setq gnus-simple-splash nil)
1033          t))))
1034    (t
1035     (insert
1036      (format "              %s
1037           _    ___ _             _
1038           _ ___ __ ___  __    _ ___
1039           __   _     ___    __  ___
1040               _           ___     _
1041              _  _ __             _
1042              ___   __            _
1043                    __           _
1044                     _      _   _
1045                    _      _    _
1046                       _  _    _
1047                   __  ___
1048                  _   _ _     _
1049                 _   _
1050               _    _
1051              _    _
1052             _
1053           __
1054
1055 "
1056              ""))
1057     ;; And then hack it.
1058     (gnus-indent-rigidly (point-min) (point-max)
1059                          (/ (max (- (window-width) (or x 46)) 0) 2))
1060     (goto-char (point-min))
1061     (forward-line 1)
1062     (let* ((pheight (count-lines (point-min) (point-max)))
1063            (wheight (window-height))
1064            (rest (- wheight pheight)))
1065       (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n)))
1066     ;; Fontify some.
1067     (put-text-property (point-min) (point-max) 'face 'gnus-splash)
1068     (setq gnus-simple-splash t)))
1069   (goto-char (point-min))
1070   (setq mode-line-buffer-identification (concat " " gnus-version))
1071   (set-buffer-modified-p t))
1072
1073 (eval-when (load)
1074   (let ((command (format "%s" this-command)))
1075     (when (string-match "gnus" command)
1076       (if (string-match "gnus-other-frame" command)
1077           (gnus-get-buffer-create gnus-group-buffer)
1078         (gnus-splash)))))
1079
1080 ;;; Do the rest.
1081
1082 (require 'gnus-util)
1083 (require 'nnheader)
1084
1085 (defcustom gnus-parameters nil
1086   "Alist of group parameters.
1087
1088 For example:
1089    ((\"mail\\\\..*\"  (gnus-show-threads nil)
1090                   (gnus-use-scoring nil)
1091                   (gnus-summary-line-format
1092                         \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
1093                   (gcc-self . t)
1094                   (display . all))
1095      (\"mail\\\\.me\" (gnus-use-scoring  t))
1096      (\"list\\\\..*\" (total-expire . t)
1097                   (broken-reply-to . t)))"
1098   :version "22.1"
1099   :group 'gnus-group-various
1100   :type '(repeat (cons regexp
1101                        (repeat sexp))))
1102
1103 (defcustom gnus-parameters-case-fold-search 'default
1104   "If it is t, ignore case of group names specified in `gnus-parameters'.
1105 If it is nil, don't ignore case.  If it is `default', which is for the
1106 backward compatibility, use the value of `case-fold-search'."
1107   :version "22.1"
1108   :group 'gnus-group-various
1109   :type '(choice :format "%{%t%}:\n %[Value Menu%] %v"
1110                  (const :tag "Use `case-fold-search'" default)
1111                  (const nil)
1112                  (const t)))
1113
1114 (defvar gnus-group-parameters-more nil)
1115
1116 (defmacro gnus-define-group-parameter (param &rest rest)
1117   "Define a group parameter PARAM.
1118 REST is a plist of following:
1119 :type               One of `bool', `list' or nil.
1120 :function           The name of the function.
1121 :function-document  The documentation of the function.
1122 :parameter-type     The type for customizing the parameter.
1123 :parameter-document The documentation for the parameter.
1124 :variable           The name of the variable.
1125 :variable-document  The documentation for the variable.
1126 :variable-group     The group for customizing the variable.
1127 :variable-type      The type for customizing the variable.
1128 :variable-default   The default value of the variable."
1129   (let* ((type (plist-get rest :type))
1130          (parameter-type (plist-get rest :parameter-type))
1131          (parameter-document (plist-get rest :parameter-document))
1132          (function (or (plist-get rest :function)
1133                        (intern (format "gnus-parameter-%s" param))))
1134          (function-document (or (plist-get rest :function-document) ""))
1135          (variable (or (plist-get rest :variable)
1136                        (intern (format "gnus-parameter-%s-alist" param))))
1137          (variable-document (or (plist-get rest :variable-document) ""))
1138          (variable-group (plist-get rest :variable-group))
1139          (variable-type (or (plist-get rest :variable-type)
1140                             `(quote (repeat
1141                                      (list (regexp :tag "Group")
1142                                            ,(car (cdr parameter-type)))))))
1143          (variable-default (plist-get rest :variable-default)))
1144     (list
1145      'progn
1146      `(defcustom ,variable ,variable-default
1147         ,variable-document
1148         :group 'gnus-group-parameter
1149         :group ',variable-group
1150         :type ,variable-type)
1151      `(setq gnus-group-parameters-more
1152             (delq (assq ',param gnus-group-parameters-more)
1153                   gnus-group-parameters-more))
1154      `(add-to-list 'gnus-group-parameters-more
1155                    (list ',param
1156                          ,parameter-type
1157                          ,parameter-document))
1158      (if (eq type 'bool)
1159          `(defun ,function (name)
1160             ,function-document
1161             (let ((params (gnus-group-find-parameter name))
1162                   val)
1163               (cond
1164                ((memq ',param params)
1165                 t)
1166                ((setq val (assq ',param params))
1167                 (cdr val))
1168                ((stringp ,variable)
1169                 (string-match ,variable name))
1170                (,variable
1171                 (let ((alist ,variable)
1172                       elem value)
1173                   (while (setq elem (pop alist))
1174                     (when (and name
1175                                (string-match (car elem) name))
1176                       (setq alist nil
1177                             value (cdr elem))))
1178                   (if (consp value) (car value) value))))))
1179        `(defun ,function (name)
1180           ,function-document
1181           (and name
1182                (or (gnus-group-find-parameter name ',param ,(and type t))
1183                    (let ((alist ,variable)
1184                          elem value)
1185                      (while (setq elem (pop alist))
1186                        (when (and name
1187                                   (string-match (car elem) name))
1188                          (setq alist nil
1189                                value (cdr elem))))
1190                      ,(if type
1191                           'value
1192                         '(if (consp value) (car value) value))))))))))
1193
1194 (defcustom gnus-home-directory "~/"
1195   "Directory variable that specifies the \"home\" directory.
1196 All other Gnus file and directory variables are initialized from this variable."
1197   :group 'gnus-files
1198   :type 'directory)
1199
1200 (defcustom gnus-directory (or (getenv "SAVEDIR")
1201                               (nnheader-concat gnus-home-directory "News/"))
1202   "*Directory variable from which all other Gnus file variables are derived.
1203
1204 Note that Gnus is mostly loaded when the `.gnus.el' file is read.
1205 This means that other directory variables that are initialized from
1206 this variable won't be set properly if you set this variable in `.gnus.el'.
1207 Set this variable in `.emacs' instead."
1208   :group 'gnus-files
1209   :type 'directory)
1210
1211 (defcustom gnus-default-directory nil
1212   "*Default directory for all Gnus buffers."
1213   :group 'gnus-files
1214   :type '(choice (const :tag "current" nil)
1215                  directory))
1216
1217 ;; Site dependent variables.  These variables should be defined in
1218 ;; paths.el.
1219
1220 (defvar gnus-default-nntp-server nil
1221   "Specify a default NNTP server.
1222 This variable should be defined in paths.el, and should never be set
1223 by the user.
1224 If you want to change servers, you should use `gnus-select-method'.
1225 See the documentation to that variable.")
1226
1227 ;; Don't touch this variable.
1228 (defvar gnus-nntp-service "nntp"
1229   "NNTP service name (\"nntp\" or 119).
1230 This is an obsolete variable, which is scarcely used.  If you use an
1231 nntp server for your newsgroup and want to change the port number
1232 used to 899, you would say something along these lines:
1233
1234  (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
1235
1236 (defcustom gnus-nntpserver-file "/etc/nntpserver"
1237   "A file with only the name of the nntp server in it."
1238   :group 'gnus-files
1239   :group 'gnus-server
1240   :type 'file)
1241
1242 (defun gnus-getenv-nntpserver ()
1243   "Find default nntp server.
1244 Check the NNTPSERVER environment variable and the
1245 `gnus-nntpserver-file' file."
1246   (or (getenv "NNTPSERVER")
1247       (and (file-readable-p gnus-nntpserver-file)
1248            (with-temp-buffer
1249              (insert-file-contents gnus-nntpserver-file)
1250              (when (re-search-forward "[^ \t\n\r]+" nil t)
1251                (match-string 0))))))
1252
1253 (defcustom gnus-select-method
1254   (condition-case nil
1255       (nconc
1256        (list 'nntp (or (condition-case nil
1257                            (gnus-getenv-nntpserver)
1258                          (error nil))
1259                        (when (and gnus-default-nntp-server
1260                                   (not (string= gnus-default-nntp-server "")))
1261                          gnus-default-nntp-server)
1262                        "news"))
1263        (if (or (null gnus-nntp-service)
1264                (equal gnus-nntp-service "nntp"))
1265            nil
1266          (list gnus-nntp-service)))
1267     (error nil))
1268   "Default method for selecting a newsgroup.
1269 This variable should be a list, where the first element is how the
1270 news is to be fetched, the second is the address.
1271
1272 For instance, if you want to get your news via \"flab.flab.edu\" using
1273 NNTP, you could say:
1274
1275 \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1276
1277 If you want to use your local spool, say:
1278
1279 \(setq gnus-select-method (list 'nnspool (system-name)))
1280
1281 If you use this variable, you must set `gnus-nntp-server' to nil.
1282
1283 There is a lot more to know about select methods and virtual servers -
1284 see the manual for details."
1285   :group 'gnus-server
1286   :type 'gnus-select-method)
1287
1288 (defcustom gnus-message-archive-method "archive"
1289   "*Method used for archiving messages you've sent.
1290 This should be a mail method."
1291   :group 'gnus-server
1292   :group 'gnus-message
1293   :type '(choice (const :tag "Default archive method" "archive")
1294                  gnus-select-method))
1295
1296 (defcustom gnus-message-archive-group nil
1297   "*Name of the group in which to save the messages you've written.
1298 This can either be a string; a list of strings; or an alist
1299 of regexps/functions/forms to be evaluated to return a string (or a list
1300 of strings).  The functions are called with the name of the current
1301 group (or nil) as a parameter.
1302
1303 If you want to save your mail in one group and the news articles you
1304 write in another group, you could say something like:
1305
1306  \(setq gnus-message-archive-group
1307         '((if (message-news-p)
1308               \"misc-news\"
1309             \"misc-mail\")))
1310
1311 Normally the group names returned by this variable should be
1312 unprefixed -- which implicitly means \"store on the archive server\".
1313 However, you may wish to store the message on some other server.  In
1314 that case, just return a fully prefixed name of the group --
1315 \"nnml+private:mail.misc\", for instance."
1316   :group 'gnus-message
1317   :type '(choice (const :tag "none" nil)
1318                  function
1319                  sexp
1320                  string))
1321
1322 (defcustom gnus-secondary-servers nil
1323   "List of NNTP servers that the user can choose between interactively.
1324 To make Gnus query you for a server, you have to give `gnus' a
1325 non-numeric prefix - `C-u M-x gnus', in short."
1326   :group 'gnus-server
1327   :type '(repeat string))
1328
1329 (defcustom gnus-nntp-server nil
1330   "*The name of the host running the NNTP server.
1331 This variable is semi-obsolete.  Use the `gnus-select-method'
1332 variable instead."
1333   :group 'gnus-server
1334   :type '(choice (const :tag "disable" nil)
1335                  string))
1336
1337 (defcustom gnus-secondary-select-methods nil
1338   "A list of secondary methods that will be used for reading news.
1339 This is a list where each element is a complete select method (see
1340 `gnus-select-method').
1341
1342 If, for instance, you want to read your mail with the nnml back end,
1343 you could set this variable:
1344
1345 \(setq gnus-secondary-select-methods '((nnml \"\")))"
1346   :group 'gnus-server
1347   :type '(repeat gnus-select-method))
1348
1349 (defvar gnus-backup-default-subscribed-newsgroups
1350   '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
1351   "Default default new newsgroups the first time Gnus is run.
1352 Should be set in paths.el, and shouldn't be touched by the user.")
1353
1354 (defcustom gnus-local-domain nil
1355   "Local domain name without a host name.
1356 The DOMAINNAME environment variable is used instead if it is defined.
1357 If the function `system-name' returns the full Internet name, there is
1358 no need to set this variable."
1359   :group 'gnus-message
1360   :type '(choice (const :tag "default" nil)
1361                  string))
1362
1363 (defvar gnus-local-organization nil
1364   "String with a description of what organization (if any) the user belongs to.
1365 Obsolete variable; use `message-user-organization' instead.")
1366
1367 ;; Customization variables
1368
1369 (defcustom gnus-refer-article-method nil
1370   "Preferred method for fetching an article by Message-ID.
1371 If you are reading news from the local spool (with nnspool), fetching
1372 articles by Message-ID is painfully slow.  By setting this method to an
1373 nntp method, you might get acceptable results.
1374
1375 The value of this variable must be a valid select method as discussed
1376 in the documentation of `gnus-select-method'.
1377
1378 It can also be a list of select methods, as well as the special symbol
1379 `current', which means to use the current select method.  If it is a
1380 list, Gnus will try all the methods in the list until it finds a match."
1381   :group 'gnus-server
1382   :type '(choice (const :tag "default" nil)
1383                  (const current)
1384                  (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1385                  gnus-select-method
1386                  (repeat :menu-tag "Try multiple"
1387                          :tag "Multiple"
1388                          :value (current (nnweb "refer" (nnweb-type google)))
1389                          (choice :tag "Method"
1390                                  (const current)
1391                                  (const :tag "Google"
1392                                         (nnweb "refer" (nnweb-type google)))
1393                                  gnus-select-method))))
1394
1395 (defcustom gnus-group-faq-directory
1396   '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
1397     "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1398     "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1399     "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1400     "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1401     "/ftp@rtfm.mit.edu:/pub/usenet/"
1402     "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1403     "/ftp@ftp.sunet.se:/pub/usenet/"
1404     "/ftp@nctuccca.nctu.edu.tw:/pub/Documents/rtfm/usenet-by-group/"
1405     "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1406     "/ftp@ftp.hk.super.net:/mirror/faqs/")
1407   "*Directory where the group FAQs are stored.
1408 This will most commonly be on a remote machine, and the file will be
1409 fetched by ange-ftp.
1410
1411 This variable can also be a list of directories.  In that case, the
1412 first element in the list will be used by default.  The others can
1413 be used when being prompted for a site.
1414
1415 Note that Gnus uses an aol machine as the default directory.  If this
1416 feels fundamentally unclean, just think of it as a way to finally get
1417 something of value back from them.
1418
1419 If the default site is too slow, try one of these:
1420
1421    North America: mirrors.aol.com                /pub/rtfm/usenet
1422                   ftp.seas.gwu.edu               /pub/rtfm
1423                   rtfm.mit.edu                   /pub/usenet
1424    Europe:        ftp.uni-paderborn.de           /pub/FAQ
1425                   src.doc.ic.ac.uk               /usenet/news-FAQS
1426                   ftp.sunet.se                   /pub/usenet
1427                   ftp.pasteur.fr                 /pub/FAQ
1428    Asia:          nctuccca.nctu.edu.tw           /pub/Documents/rtfm/usenet-by-group/
1429                   hwarang.postech.ac.kr          /pub/usenet
1430                   ftp.hk.super.net               /mirror/faqs"
1431   :group 'gnus-group-various
1432   :type '(choice directory
1433                  (repeat directory)))
1434
1435 (defcustom gnus-group-charter-alist
1436   '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1437     ("de" . (concat "http://purl.net/charta/" name ".html"))
1438     ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1439     ("england" . (concat "http://england.news-admin.org/charters/" name))
1440     ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1441     ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1442                         (gnus-replace-in-string name "europa\\." "") ".html"))
1443     ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1444     ("aus" . (concat "http://aus.news-admin.org/groupinfo.cgi/" name))
1445     ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1446     ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1447     ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1448     ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1449     ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1450     ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1451                     (gnus-replace-in-string name "\\." "_") ".html"))
1452     ("milw" . (concat "http://usenet.mil.wi.us/"
1453                       (gnus-replace-in-string name "milw\\." "") "-charter"))
1454     ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1455     ("netins" . (concat "http://www.netins.net/usenet/charter/"
1456                         (gnus-replace-in-string name "\\." "-") "-charter.html")))
1457   "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1458 When FORM is evaluated `name' is bound to the name of the group."
1459   :version "22.1"
1460   :group 'gnus-group-various
1461   :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1462
1463 (defcustom gnus-group-fetch-control-use-browse-url nil
1464   "*Non-nil means that control messages are displayed using `browse-url'.
1465 Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1466 group."
1467   :version "22.1"
1468   :group 'gnus-group-various
1469   :type 'boolean)
1470
1471 (defcustom gnus-use-cross-reference t