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