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