/[emacs]/emacs/lisp/gnus/gnus.el
ViewVC logotype

Diff of /emacs/lisp/gnus/gnus.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23.4.2 by miles, Tue Oct 14 23:34:50 2003 UTC revision 1.23.4.3 by miles, Thu Sep 16 00:12:16 2004 UTC
# Line 1  Line 1 
1  ;;; gnus.el --- a newsreader for GNU Emacs  ;;; gnus.el --- a newsreader for GNU Emacs
2    
3  ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,  ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,
4  ;;               1998, 2000, 2001, 2002 Free Software Foundation, Inc.  ;; 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5    
6  ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>  ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
# Line 30  Line 31 
31  (eval '(run-hooks 'gnus-load-hook))  (eval '(run-hooks 'gnus-load-hook))
32    
33  (eval-when-compile (require 'cl))  (eval-when-compile (require 'cl))
34    (require 'wid-edit)
35  (require 'mm-util)  (require 'mm-util)
36    (require 'nnheader)
37    
38  (defgroup gnus nil  (defgroup gnus nil
39    "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."    "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
40    :group 'news    :group 'news
41    :group 'mail)    :group 'mail)
42    
43    (defgroup gnus-format nil
44      "Dealing with formatting issues."
45      :group 'gnus)
46    
47  (defgroup gnus-charset nil  (defgroup gnus-charset nil
48    "Group character set issues."    "Group character set issues."
49    :link '(custom-manual "(gnus)Charsets")    :link '(custom-manual "(gnus)Charsets")
# Line 45  Line 52 
52    
53  (defgroup gnus-cache nil  (defgroup gnus-cache nil
54    "Cache interface."    "Cache interface."
55      :link '(custom-manual "(gnus)Article Caching")
56      :group 'gnus)
57    
58    (defgroup gnus-registry nil
59      "Article Registry."
60    :group 'gnus)    :group 'gnus)
61    
62  (defgroup gnus-start nil  (defgroup gnus-start nil
# Line 58  Line 70 
70  ;; These belong to gnus-group.el.  ;; These belong to gnus-group.el.
71  (defgroup gnus-group nil  (defgroup gnus-group nil
72    "Group buffers."    "Group buffers."
73    :link '(custom-manual "(gnus)The Group Buffer")    :link '(custom-manual "(gnus)Group Buffer")
74    :group 'gnus)    :group 'gnus)
75    
76  (defgroup gnus-group-foreign nil  (defgroup gnus-group-foreign nil
# Line 99  Line 111 
111  ;; These belong to gnus-sum.el.  ;; These belong to gnus-sum.el.
112  (defgroup gnus-summary nil  (defgroup gnus-summary nil
113    "Summary buffers."    "Summary buffers."
114    :link '(custom-manual "(gnus)The Summary Buffer")    :link '(custom-manual "(gnus)Summary Buffer")
115    :group 'gnus)    :group 'gnus)
116    
117  (defgroup gnus-summary-exit nil  (defgroup gnus-summary-exit nil
# Line 132  Line 144 
144    :link '(custom-manual "(gnus)Summary Maneuvering")    :link '(custom-manual "(gnus)Summary Maneuvering")
145    :group 'gnus-summary)    :group 'gnus-summary)
146    
147    (defgroup gnus-picon nil
148      "Show pictures of people, domains, and newsgroups."
149      :group 'gnus-visual)
150    
151  (defgroup gnus-summary-mail nil  (defgroup gnus-summary-mail nil
152    "Mail group commands."    "Mail group commands."
153    :link '(custom-manual "(gnus)Mail Group Commands")    :link '(custom-manual "(gnus)Mail Group Commands")
# Line 139  Line 155 
155    
156  (defgroup gnus-summary-sort nil  (defgroup gnus-summary-sort nil
157    "Sorting the summary buffer."    "Sorting the summary buffer."
158    :link '(custom-manual "(gnus)Sorting")    :link '(custom-manual "(gnus)Sorting the Summary Buffer")
159    :group 'gnus-summary)    :group 'gnus-summary)
160    
161  (defgroup gnus-summary-visual nil  (defgroup gnus-summary-visual nil
# Line 207  Line 223 
223    
224  ;; Other  ;; Other
225  (defgroup gnus-visual nil  (defgroup gnus-visual nil
226    "Options controling the visual fluff."    "Options controlling the visual fluff."
227    :group 'gnus    :group 'gnus
228    :group 'faces)    :group 'faces)
229    
# Line 232  Line 248 
248    "Options related to newsservers and other servers used by Gnus."    "Options related to newsservers and other servers used by Gnus."
249    :group 'gnus)    :group 'gnus)
250    
251    (defgroup gnus-server-visual nil
252      "Highlighting and menus in the server buffer."
253      :group 'gnus-visual
254      :group 'gnus-server)
255    
256  (defgroup gnus-message '((message custom-group))  (defgroup gnus-message '((message custom-group))
257    "Composing replies and followups in Gnus."    "Composing replies and followups in Gnus."
258    :group 'gnus)    :group 'gnus)
259    
260  (defgroup gnus-meta nil  (defgroup gnus-meta nil
261    "Meta variables controling major portions of Gnus.    "Meta variables controlling major portions of Gnus.
262  In general, modifying these variables does not take affect until Gnus  In general, modifying these variables does not take affect until Gnus
263  is restarted, and sometimes reloaded."  is restarted, and sometimes reloaded."
264    :group 'gnus)    :group 'gnus)
# Line 256  is restarted, and sometimes reloaded." Line 277  is restarted, and sometimes reloaded."
277    :link '(custom-manual "(gnus)Exiting Gnus")    :link '(custom-manual "(gnus)Exiting Gnus")
278    :group 'gnus)    :group 'gnus)
279    
280  (defconst gnus-version-number "5.9.0"  (defgroup gnus-fun nil
281      "Frivolous Gnus extensions."
282      :link '(custom-manual "(gnus)Exiting Gnus")
283      :group 'gnus)
284    
285    (defconst gnus-version-number "5.10.6"
286    "Version number for this version of Gnus.")    "Version number for this version of Gnus.")
287    
288  (defconst gnus-version (format "Gnus v%s" gnus-version-number)  (defconst gnus-version (format "Gnus v%s" gnus-version-number)
# Line 274  be set in `.emacs' instead." Line 300  be set in `.emacs' instead."
300    :group 'gnus-start    :group 'gnus-start
301    :type 'boolean)    :type 'boolean)
302    
303    (unless (fboundp 'gnus-group-remove-excess-properties)
304      (defalias 'gnus-group-remove-excess-properties 'ignore))
305    
306    (unless (fboundp 'gnus-set-text-properties)
307      (defalias 'gnus-set-text-properties 'set-text-properties))
308    
309  (unless (featurep 'gnus-xmas)  (unless (featurep 'gnus-xmas)
310    (defalias 'gnus-make-overlay 'make-overlay)    (defalias 'gnus-make-overlay 'make-overlay)
311    (defalias 'gnus-delete-overlay 'delete-overlay)    (defalias 'gnus-delete-overlay 'delete-overlay)
# Line 284  be set in `.emacs' instead." Line 316  be set in `.emacs' instead."
316    (defalias 'gnus-overlay-end 'overlay-end)    (defalias 'gnus-overlay-end 'overlay-end)
317    (defalias 'gnus-extent-detached-p 'ignore)    (defalias 'gnus-extent-detached-p 'ignore)
318    (defalias 'gnus-extent-start-open 'ignore)    (defalias 'gnus-extent-start-open 'ignore)
   (defalias 'gnus-set-text-properties 'set-text-properties)  
   (defalias 'gnus-group-remove-excess-properties 'ignore)  
319    (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)    (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
320    (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)    (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
321    (defalias 'gnus-character-to-event 'identity)    (defalias 'gnus-character-to-event 'identity)
322      (defalias 'gnus-assq-delete-all 'assq-delete-all)
323    (defalias 'gnus-add-text-properties 'add-text-properties)    (defalias 'gnus-add-text-properties 'add-text-properties)
324    (defalias 'gnus-put-text-property 'put-text-property)    (defalias 'gnus-put-text-property 'put-text-property)
325    (defvar gnus-mode-line-image-cache t)    (defvar gnus-mode-line-image-cache t)
# Line 308  be set in `.emacs' instead." Line 339  be set in `.emacs' instead."
339                                           (:type xbm :file "gnus-pointer.xbm"                                           (:type xbm :file "gnus-pointer.xbm"
340                                                  :ascent center))))                                                  :ascent center))))
341                                gnus-mode-line-image-cache)                                gnus-mode-line-image-cache)
342                              'help-echo "This is Gnus")                              'help-echo (format
343                                            "This is %s, %s."
344                                            gnus-version (gnus-emacs-version)))
345                        str)                        str)
346                       (list str))                       (list str))
347              line)))              line)))
# Line 317  be set in `.emacs' instead." Line 350  be set in `.emacs' instead."
350    (defalias 'gnus-deactivate-mark 'deactivate-mark)    (defalias 'gnus-deactivate-mark 'deactivate-mark)
351    (defalias 'gnus-window-edges 'window-edges)    (defalias 'gnus-window-edges 'window-edges)
352    (defalias 'gnus-key-press-event-p 'numberp)    (defalias 'gnus-key-press-event-p 'numberp)
353    (defalias 'gnus-decode-rfc1522 'ignore))    ;;(defalias 'gnus-decode-rfc1522 'ignore)
354      )
355    
356  ;; We define these group faces here to avoid the display  ;; We define these group faces here to avoid the display
357  ;; update forced when creating new faces.  ;; update forced when creating new faces.
# Line 325  be set in `.emacs' instead." Line 359  be set in `.emacs' instead."
359  (defface gnus-group-news-1-face  (defface gnus-group-news-1-face
360    '((((class color)    '((((class color)
361        (background dark))        (background dark))
362       (:foreground "PaleTurquoise" :weight bold))       (:foreground "PaleTurquoise" :bold t))
363      (((class color)      (((class color)
364        (background light))        (background light))
365       (:foreground "ForestGreen" :weight bold))       (:foreground "ForestGreen" :bold t))
366      (t      (t
367       ()))       ()))
368    "Level 1 newsgroup face.")    "Level 1 newsgroup face.")
# Line 347  be set in `.emacs' instead." Line 381  be set in `.emacs' instead."
381  (defface gnus-group-news-2-face  (defface gnus-group-news-2-face
382    '((((class color)    '((((class color)
383        (background dark))        (background dark))
384       (:foreground "turquoise" :weight bold))       (:foreground "turquoise" :bold t))
385      (((class color)      (((class color)
386        (background light))        (background light))
387       (:foreground "CadetBlue4" :weight bold))       (:foreground "CadetBlue4" :bold t))
388      (t      (t
389       ()))       ()))
390    "Level 2 newsgroup face.")    "Level 2 newsgroup face.")
# Line 369  be set in `.emacs' instead." Line 403  be set in `.emacs' instead."
403  (defface gnus-group-news-3-face  (defface gnus-group-news-3-face
404    '((((class color)    '((((class color)
405        (background dark))        (background dark))
406       (:weight bold))       (:bold t))
407      (((class color)      (((class color)
408        (background light))        (background light))
409       (:weight bold))       (:bold t))
410      (t      (t
411       ()))       ()))
412    "Level 3 newsgroup face.")    "Level 3 newsgroup face.")
# Line 391  be set in `.emacs' instead." Line 425  be set in `.emacs' instead."
425  (defface gnus-group-news-4-face  (defface gnus-group-news-4-face
426    '((((class color)    '((((class color)
427        (background dark))        (background dark))
428       (:weight bold))       (:bold t))
429      (((class color)      (((class color)
430        (background light))        (background light))
431       (:weight bold))       (:bold t))
432      (t      (t
433       ()))       ()))
434    "Level 4 newsgroup face.")    "Level 4 newsgroup face.")
# Line 413  be set in `.emacs' instead." Line 447  be set in `.emacs' instead."
447  (defface gnus-group-news-5-face  (defface gnus-group-news-5-face
448    '((((class color)    '((((class color)
449        (background dark))        (background dark))
450       (:weight bold))       (:bold t))
451      (((class color)      (((class color)
452        (background light))        (background light))
453       (:weight bold))       (:bold t))
454      (t      (t
455       ()))       ()))
456    "Level 5 newsgroup face.")    "Level 5 newsgroup face.")
# Line 435  be set in `.emacs' instead." Line 469  be set in `.emacs' instead."
469  (defface gnus-group-news-6-face  (defface gnus-group-news-6-face
470    '((((class color)    '((((class color)
471        (background dark))        (background dark))
472       (:weight bold))       (:bold t))
473      (((class color)      (((class color)
474        (background light))        (background light))
475       (:weight bold))       (:bold t))
476      (t      (t
477       ()))       ()))
478    "Level 6 newsgroup face.")    "Level 6 newsgroup face.")
# Line 457  be set in `.emacs' instead." Line 491  be set in `.emacs' instead."
491  (defface gnus-group-news-low-face  (defface gnus-group-news-low-face
492    '((((class color)    '((((class color)
493        (background dark))        (background dark))
494       (:foreground "DarkTurquoise" :weight bold))       (:foreground "DarkTurquoise" :bold t))
495      (((class color)      (((class color)
496        (background light))        (background light))
497       (:foreground "DarkGreen" :weight bold))       (:foreground "DarkGreen" :bold t))
498      (t      (t
499       ()))       ()))
500    "Low level newsgroup face.")    "Low level newsgroup face.")
# Line 479  be set in `.emacs' instead." Line 513  be set in `.emacs' instead."
513  (defface gnus-group-mail-1-face  (defface gnus-group-mail-1-face
514    '((((class color)    '((((class color)
515        (background dark))        (background dark))
516       (:foreground "aquamarine1" :weight bold))       (:foreground "aquamarine1" :bold t))
517      (((class color)      (((class color)
518        (background light))        (background light))
519       (:foreground "DeepPink3" :weight bold))       (:foreground "DeepPink3" :bold t))
520      (t      (t
521       (:weight bold)))       (:bold t)))
522    "Level 1 mailgroup face.")    "Level 1 mailgroup face.")
523    
524  (defface gnus-group-mail-1-empty-face  (defface gnus-group-mail-1-empty-face
# Line 495  be set in `.emacs' instead." Line 529  be set in `.emacs' instead."
529        (background light))        (background light))
530       (:foreground "DeepPink3"))       (:foreground "DeepPink3"))
531      (t      (t
532       (:slant italic :weight bold)))       (:italic t :bold t)))
533    "Level 1 empty mailgroup face.")    "Level 1 empty mailgroup face.")
534    
535  (defface gnus-group-mail-2-face  (defface gnus-group-mail-2-face
536    '((((class color)    '((((class color)
537        (background dark))        (background dark))
538       (:foreground "aquamarine2" :weight bold))       (:foreground "aquamarine2" :bold t))
539      (((class color)      (((class color)
540        (background light))        (background light))
541       (:foreground "HotPink3" :weight bold))       (:foreground "HotPink3" :bold t))
542      (t      (t
543       (:weight bold)))       (:bold t)))
544    "Level 2 mailgroup face.")    "Level 2 mailgroup face.")
545    
546  (defface gnus-group-mail-2-empty-face  (defface gnus-group-mail-2-empty-face
# Line 517  be set in `.emacs' instead." Line 551  be set in `.emacs' instead."
551        (background light))        (background light))
552       (:foreground "HotPink3"))       (:foreground "HotPink3"))
553      (t      (t
554       (:weight bold)))       (:bold t)))
555    "Level 2 empty mailgroup face.")    "Level 2 empty mailgroup face.")
556    
557  (defface gnus-group-mail-3-face  (defface gnus-group-mail-3-face
558    '((((class color)    '((((class color)
559        (background dark))        (background dark))
560       (:foreground "aquamarine3" :weight bold))       (:foreground "aquamarine3" :bold t))
561      (((class color)      (((class color)
562        (background light))        (background light))
563       (:foreground "magenta4" :weight bold))       (:foreground "magenta4" :bold t))
564      (t      (t
565       (:weight bold)))       (:bold t)))
566    "Level 3 mailgroup face.")    "Level 3 mailgroup face.")
567    
568  (defface gnus-group-mail-3-empty-face  (defface gnus-group-mail-3-empty-face
# Line 545  be set in `.emacs' instead." Line 579  be set in `.emacs' instead."
579  (defface gnus-group-mail-low-face  (defface gnus-group-mail-low-face
580    '((((class color)    '((((class color)
581        (background dark))        (background dark))
582       (:foreground "aquamarine4" :weight bold))       (:foreground "aquamarine4" :bold t))
583      (((class color)      (((class color)
584        (background light))        (background light))
585       (:foreground "DeepPink4" :weight bold))       (:foreground "DeepPink4" :bold t))
586      (t      (t
587       (:weight bold)))       (:bold t)))
588    "Low level mailgroup face.")    "Low level mailgroup face.")
589    
590  (defface gnus-group-mail-low-empty-face  (defface gnus-group-mail-low-empty-face
# Line 561  be set in `.emacs' instead." Line 595  be set in `.emacs' instead."
595        (background light))        (background light))
596       (:foreground "DeepPink4"))       (:foreground "DeepPink4"))
597      (t      (t
598       (:weight bold)))       (:bold t)))
599    "Low level empty mailgroup face.")    "Low level empty mailgroup face.")
600    
601  ;; Summary mode faces.  ;; Summary mode faces.
# Line 578  be set in `.emacs' instead." Line 612  be set in `.emacs' instead."
612  (defface gnus-summary-high-ticked-face  (defface gnus-summary-high-ticked-face
613    '((((class color)    '((((class color)
614        (background dark))        (background dark))
615       (:foreground "pink" :weight bold))       (:foreground "pink" :bold t))
616      (((class color)      (((class color)
617        (background light))        (background light))
618       (:foreground "firebrick" :weight bold))       (:foreground "firebrick" :bold t))
619      (t      (t
620       (:weight bold)))       (:bold t)))
621    "Face used for high interest ticked articles.")    "Face used for high interest ticked articles.")
622    
623  (defface gnus-summary-low-ticked-face  (defface gnus-summary-low-ticked-face
624    '((((class color)    '((((class color)
625        (background dark))        (background dark))
626       (:foreground "pink" :slant italic))       (:foreground "pink" :italic t))
627      (((class color)      (((class color)
628        (background light))        (background light))
629       (:foreground "firebrick" :slant italic))       (:foreground "firebrick" :italic t))
630      (t      (t
631       (:slant italic)))       (:italic t)))
632    "Face used for low interest ticked articles.")    "Face used for low interest ticked articles.")
633    
634  (defface gnus-summary-normal-ticked-face  (defface gnus-summary-normal-ticked-face
# Line 611  be set in `.emacs' instead." Line 645  be set in `.emacs' instead."
645  (defface gnus-summary-high-ancient-face  (defface gnus-summary-high-ancient-face
646    '((((class color)    '((((class color)
647        (background dark))        (background dark))
648       (:foreground "SkyBlue" :weight bold))       (:foreground "SkyBlue" :bold t))
649      (((class color)      (((class color)
650        (background light))        (background light))
651       (:foreground "RoyalBlue" :weight bold))       (:foreground "RoyalBlue" :bold t))
652      (t      (t
653       (:weight bold)))       (:bold t)))
654    "Face used for high interest ancient articles.")    "Face used for high interest ancient articles.")
655    
656  (defface gnus-summary-low-ancient-face  (defface gnus-summary-low-ancient-face
657    '((((class color)    '((((class color)
658        (background dark))        (background dark))
659       (:foreground "SkyBlue" :slant italic))       (:foreground "SkyBlue" :italic t))
660      (((class color)      (((class color)
661        (background light))        (background light))
662       (:foreground "RoyalBlue" :slant italic))       (:foreground "RoyalBlue" :italic t))
663      (t      (t
664       (:slant italic)))       (:italic t)))
665    "Face used for low interest ancient articles.")    "Face used for low interest ancient articles.")
666    
667  (defface gnus-summary-normal-ancient-face  (defface gnus-summary-normal-ancient-face
# Line 641  be set in `.emacs' instead." Line 675  be set in `.emacs' instead."
675       ()))       ()))
676    "Face used for normal interest ancient articles.")    "Face used for normal interest ancient articles.")
677    
678    (defface gnus-summary-high-undownloaded-face
679       '((((class color)
680           (background light))
681          (:bold t :foreground "cyan4"))
682         (((class color) (background dark))
683          (:bold t :foreground "LightGray"))
684         (t (:inverse-video t :bold t)))
685      "Face used for high interest uncached articles.")
686    
687    (defface gnus-summary-low-undownloaded-face
688       '((((class color)
689           (background light))
690          (:italic t :foreground "cyan4" :bold nil))
691         (((class color) (background dark))
692          (:italic t :foreground "LightGray" :bold nil))
693         (t (:inverse-video t :italic t)))
694      "Face used for low interest uncached articles.")
695    
696    (defface gnus-summary-normal-undownloaded-face
697       '((((class color)
698           (background light))
699          (:foreground "cyan4" :bold nil))
700         (((class color) (background dark))
701          (:foreground "LightGray" :bold nil))
702         (t (:inverse-video t)))
703      "Face used for normal interest uncached articles.")
704    
705  (defface gnus-summary-high-unread-face  (defface gnus-summary-high-unread-face
706    '((t    '((t
707       (:weight bold)))       (:bold t)))
708    "Face used for high interest unread articles.")    "Face used for high interest unread articles.")
709    
710  (defface gnus-summary-low-unread-face  (defface gnus-summary-low-unread-face
711    '((t    '((t
712       (:slant italic)))       (:italic t)))
713    "Face used for low interest unread articles.")    "Face used for low interest unread articles.")
714    
715  (defface gnus-summary-normal-unread-face  (defface gnus-summary-normal-unread-face
# Line 660  be set in `.emacs' instead." Line 721  be set in `.emacs' instead."
721    '((((class color)    '((((class color)
722        (background dark))        (background dark))
723       (:foreground "PaleGreen"       (:foreground "PaleGreen"
724                    :weight bold))                    :bold t))
725      (((class color)      (((class color)
726        (background light))        (background light))
727       (:foreground "DarkGreen"       (:foreground "DarkGreen"
728                    :weight bold))                    :bold t))
729      (t      (t
730       (:weight bold)))       (:bold t)))
731    "Face used for high interest read articles.")    "Face used for high interest read articles.")
732    
733  (defface gnus-summary-low-read-face  (defface gnus-summary-low-read-face
734    '((((class color)    '((((class color)
735        (background dark))        (background dark))
736       (:foreground "PaleGreen"       (:foreground "PaleGreen"
737                    :slant italic))                    :italic t))
738      (((class color)      (((class color)
739        (background light))        (background light))
740       (:foreground "DarkGreen"       (:foreground "DarkGreen"
741                    :slant italic))                    :italic t))
742      (t      (t
743       (:slant italic)))       (:italic t)))
744    "Face used for low interest read articles.")    "Face used for low interest read articles.")
745    
746  (defface gnus-summary-normal-read-face  (defface gnus-summary-normal-read-face
# Line 709  be set in `.emacs' instead." Line 770  be set in `.emacs' instead."
770    "Add the current buffer to the list of Gnus buffers."    "Add the current buffer to the list of Gnus buffers."
771    (push (current-buffer) gnus-buffers))    (push (current-buffer) gnus-buffers))
772    
773    (defmacro gnus-kill-buffer (buffer)
774      "Kill BUFFER and remove from the list of Gnus buffers."
775      `(let ((buf ,buffer))
776         (when (gnus-buffer-exists-p buf)
777           (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
778           (kill-buffer buf))))
779    
780  (defun gnus-buffers ()  (defun gnus-buffers ()
781    "Return a list of live Gnus buffers."    "Return a list of live Gnus buffers."
782    (while (and gnus-buffers    (while (and gnus-buffers
# Line 731  be set in `.emacs' instead." Line 799  be set in `.emacs' instead."
799  (defface gnus-splash-face  (defface gnus-splash-face
800    '((((class color)    '((((class color)
801        (background dark))        (background dark))
802       (:foreground "Brown"))       (:foreground "#888888"))
803      (((class color)      (((class color)
804        (background light))        (background light))
805       (:foreground "Brown"))       (:foreground "#888888"))
806      (t      (t
807       ()))       ()))
808    "Face of the splash screen.")    "Face for the splash screen.")
809    
810  (defun gnus-splash ()  (defun gnus-splash ()
811    (save-excursion    (save-excursion
# Line 765  be set in `.emacs' instead." Line 833  be set in `.emacs' instead."
833    
834  (defvar gnus-simple-splash nil)  (defvar gnus-simple-splash nil)
835    
836    ;;(format "%02x%02x%02x" 114 66 20) "724214"
837    
838    (defvar gnus-logo-color-alist
839      '((flame "#cc3300" "#ff2200")
840        (pine "#c0cc93" "#f8ffb8")
841        (moss "#a1cc93" "#d2ffb8")
842        (irish "#04cc90" "#05ff97")
843        (sky "#049acc" "#05deff")
844        (tin "#6886cc" "#82b6ff")
845        (velvet "#7c68cc" "#8c82ff")
846        (grape "#b264cc" "#cf7df")
847        (labia "#cc64c2" "#fd7dff")
848        (berry "#cc6485" "#ff7db5")
849        (dino "#724214" "#1e3f03")
850        (oort "#cccccc" "#888888")
851        (storm "#666699" "#99ccff")
852        (pdino "#9999cc" "#99ccff")
853        (purp "#9999cc" "#666699")
854        (no "#000000" "#ff0000")
855        (neutral "#b4b4b4" "#878787")
856        (september "#bf9900" "#ffcc00"))
857      "Color alist used for the Gnus logo.")
858    
859    (defcustom gnus-logo-color-style 'oort
860      "*Color styles used for the Gnus logo."
861      :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
862                               gnus-logo-color-alist))
863      :group 'gnus-xmas)
864    
865    (defvar gnus-logo-colors
866      (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
867      "Colors used for the Gnus logo.")
868    
869  (defun gnus-group-startup-message (&optional x y)  (defun gnus-group-startup-message (&optional x y)
870    "Insert startup message in current buffer."    "Insert startup message in current buffer."
871    ;; Insert the message.    ;; Insert the message.
# Line 773  be set in `.emacs' instead." Line 874  be set in `.emacs' instead."
874     ((and     ((and
875       (fboundp 'find-image)       (fboundp 'find-image)
876       (display-graphic-p)       (display-graphic-p)
877       (let ((image (find-image       (let* ((data-directory (nnheader-find-etc-directory "gnus"))
878                     `((:type xpm :file "gnus.xpm")              (image (find-image
879                       (:type pbm :file "gnus.pbm"                      `((:type xpm :file "gnus.xpm"
880                              ;; Account for the pbm's blackground.                               :color-symbols
881                              :background ,(face-foreground 'gnus-splash-face)                               (("thing" . ,(car gnus-logo-colors))
882                              :foreground ,(face-background 'default))                                ("shadow" . ,(cadr gnus-logo-colors))
883                       (:type xbm :file "gnus.xbm"                                ("oort" . "#eeeeee")
884                              ;; Account for the xbm's blackground.                                ("background" . ,(face-background 'default))))
885                              :background ,(face-foreground 'gnus-splash-face)                        (:type pbm :file "gnus.pbm"
886                              :foreground ,(face-background 'default))))))                               ;; Account for the pbm's blackground.
887                                 :background ,(face-foreground 'gnus-splash-face)
888                                 :foreground ,(face-background 'default))
889                          (:type xbm :file "gnus.xbm"
890                                 ;; Account for the xbm's blackground.
891                                 :background ,(face-foreground 'gnus-splash-face)
892                                 :foreground ,(face-background 'default))))))
893         (when image         (when image
894           (let ((size (image-size image)))           (let ((size (image-size image)))
895             (insert-char ?\n (max 0 (round (- (window-height)             (insert-char ?\n (max 0 (round (- (window-height)
# Line 833  be set in `.emacs' instead." Line 940  be set in `.emacs' instead."
940    
941  (eval-when (load)  (eval-when (load)
942    (let ((command (format "%s" this-command)))    (let ((command (format "%s" this-command)))
943      (if (and (string-match "gnus" command)      (when (string-match "gnus" command)
944               (not (string-match "gnus-other-frame" command)))        (if (string-match "gnus-other-frame" command)
945          (gnus-splash)            (gnus-get-buffer-create gnus-group-buffer)
946        (gnus-get-buffer-create gnus-group-buffer))))          (gnus-splash)))))
947    
948  ;;; Do the rest.  ;;; Do the rest.
949    
950  (require 'gnus-util)  (require 'gnus-util)
951  (require 'nnheader)  (require 'nnheader)
952    
953    (defcustom gnus-parameters nil
954      "Alist of group parameters.
955    
956    For example:
957       ((\"mail\\\\..*\"  (gnus-show-threads nil)
958                      (gnus-use-scoring nil)
959                      (gnus-summary-line-format
960                            \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
961                      (gcc-self . t)
962                      (display . all))
963         (\"mail\\\\.me\" (gnus-use-scoring  t))
964         (\"list\\\\..*\" (total-expire . t)
965                      (broken-reply-to . t)))"
966      :group 'gnus-group-various
967      :type '(repeat (cons regexp
968                           (repeat sexp))))
969    
970    (defvar gnus-group-parameters-more nil)
971    
972    (defmacro gnus-define-group-parameter (param &rest rest)
973      "Define a group parameter PARAM.
974    REST is a plist of following:
975    :type               One of `bool', `list' or nil.
976    :function           The name of the function.
977    :function-document  The documentation of the function.
978    :parameter-type     The type for customizing the parameter.
979    :parameter-document The documentation for the parameter.
980    :variable           The name of the variable.
981    :variable-document  The documentation for the variable.
982    :variable-group     The group for customizing the variable.
983    :variable-type      The type for customizing the variable.
984    :variable-default   The default value of the variable."
985      (let* ((type (plist-get rest :type))
986             (parameter-type (plist-get rest :parameter-type))
987             (parameter-document (plist-get rest :parameter-document))
988             (function (or (plist-get rest :function)
989                           (intern (format "gnus-parameter-%s" param))))
990             (function-document (or (plist-get rest :function-document) ""))
991             (variable (or (plist-get rest :variable)
992                           (intern (format "gnus-parameter-%s-alist" param))))
993             (variable-document (or (plist-get rest :variable-document) ""))
994             (variable-group (plist-get rest :variable-group))
995             (variable-type (or (plist-get rest :variable-type)
996                                `(quote (repeat
997                                         (list (regexp :tag "Group")
998                                               ,(car (cdr parameter-type)))))))
999             (variable-default (plist-get rest :variable-default)))
1000        (list
1001         'progn
1002         `(defcustom ,variable ,variable-default
1003            ,variable-document
1004            :group 'gnus-group-parameter
1005            :group ',variable-group
1006            :type ,variable-type)
1007         `(setq gnus-group-parameters-more
1008                (delq (assq ',param gnus-group-parameters-more)
1009                      gnus-group-parameters-more))
1010         `(add-to-list 'gnus-group-parameters-more
1011                       (list ',param
1012                             ,parameter-type
1013                             ,parameter-document))
1014         (if (eq type 'bool)
1015             `(defun ,function (name)
1016                ,function-document
1017                (let ((params (gnus-group-find-parameter name))
1018                      val)
1019                  (cond
1020                   ((memq ',param params)
1021                    t)
1022                   ((setq val (assq ',param params))
1023                    (cdr val))
1024                   ((stringp ,variable)
1025                    (string-match ,variable name))
1026                   (,variable
1027                    (let ((alist ,variable)
1028                          elem value)
1029                      (while (setq elem (pop alist))
1030                        (when (and name
1031                                   (string-match (car elem) name))
1032                          (setq alist nil
1033                                value (cdr elem))))
1034                      (if (consp value) (car value) value))))))
1035           `(defun ,function (name)
1036              ,function-document
1037              (and name
1038                   (or (gnus-group-find-parameter name ',param ,(and type t))
1039                       (let ((alist ,variable)
1040                             elem value)
1041                         (while (setq elem (pop alist))
1042                           (when (and name
1043                                      (string-match (car elem) name))
1044                             (setq alist nil
1045                                   value (cdr elem))))
1046                         ,(if type
1047                              'value
1048                            '(if (consp value) (car value) value))))))))))
1049    
1050  (defcustom gnus-home-directory "~/"  (defcustom gnus-home-directory "~/"
1051    "Directory variable that specifies the \"home\" directory.    "Directory variable that specifies the \"home\" directory.
1052  All other Gnus file and directory variables are initialized from this variable."  All other Gnus file and directory variables are initialized from this variable."
# Line 891  used to 899, you would say something alo Line 1095  used to 899, you would say something alo
1095    :group 'gnus-server    :group 'gnus-server
1096    :type 'file)    :type 'file)
1097    
 ;; This function is used to check both the environment variable  
 ;; NNTPSERVER and the /etc/nntpserver file to see whether one can find  
 ;; an nntp server name default.  
1098  (defun gnus-getenv-nntpserver ()  (defun gnus-getenv-nntpserver ()
1099      "Find default nntp server.
1100    Check the NNTPSERVER environment variable and the
1101    `gnus-nntpserver-file' file."
1102    (or (getenv "NNTPSERVER")    (or (getenv "NNTPSERVER")
1103        (and (file-readable-p gnus-nntpserver-file)        (and (file-readable-p gnus-nntpserver-file)
1104             (save-excursion             (with-temp-buffer
              (set-buffer (gnus-get-buffer-create " *gnus nntp*"))  
1105               (insert-file-contents gnus-nntpserver-file)               (insert-file-contents gnus-nntpserver-file)
1106               (let ((name (buffer-string)))               (let ((name (buffer-string)))
1107                 (prog1                 (unless (string-match "\\`[ \t\n]*$" name)
1108                     (if (string-match "\\'[ \t\n]*$" name)                   name))))))
                        nil  
                      name)  
                  (kill-buffer (current-buffer))))))))  
1109    
1110  (defcustom gnus-select-method  (defcustom gnus-select-method
1111    (condition-case nil    (condition-case nil
# Line 926  used to 899, you would say something alo Line 1126  used to 899, you would say something alo
1126  This variable should be a list, where the first element is how the  This variable should be a list, where the first element is how the
1127  news is to be fetched, the second is the address.  news is to be fetched, the second is the address.
1128    
1129  For instance, if you want to get your news via NNTP from  For instance, if you want to get your news via \"flab.flab.edu\" using
1130  \"flab.flab.edu\", you could say:  NNTP, you could say:
1131    
1132  \(setq gnus-select-method '(nntp \"flab.flab.edu\"))  \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1133    
# Line 942  see the manual for details." Line 1142  see the manual for details."
1142    :group 'gnus-server    :group 'gnus-server
1143    :type 'gnus-select-method)    :type 'gnus-select-method)
1144    
1145  (defcustom gnus-message-archive-method  (defcustom gnus-message-archive-method "archive"
   (progn  
     ;; Don't require it at top level to avoid circularity.  
     (require 'message)  
     `(nnfolder  
       "archive"  
       (nnfolder-directory ,(nnheader-concat message-directory "archive"))  
       (nnfolder-active-file  
        ,(nnheader-concat message-directory "archive/active"))  
       (nnfolder-get-new-mail nil)  
       (nnfolder-inhibit-expiry t)))  
1146    "*Method used for archiving messages you've sent.    "*Method used for archiving messages you've sent.
1147  This should be a mail method.  This should be a mail method."
   
 It's probably not very effective to change this variable once you've  
 run Gnus once.  After doing that, you must edit this server from the  
 server buffer."  
1148    :group 'gnus-server    :group 'gnus-server
1149    :group 'gnus-message    :group 'gnus-message
1150    :type 'gnus-select-method)    :type '(choice (const :tag "Default archive method" "archive")
1151                     gnus-select-method))
1152    
1153  (defcustom gnus-message-archive-group nil  (defcustom gnus-message-archive-group nil
1154    "*Name of the group in which to save the messages you've written.    "*Name of the group in which to save the messages you've written.
# Line 974  If you want to save your mail in one gro Line 1161  If you want to save your mail in one gro
1161  write in another group, you could say something like:  write in another group, you could say something like:
1162    
1163   \(setq gnus-message-archive-group   \(setq gnus-message-archive-group
1164          '((if (message-news-p)          '((if (message-news-p)
1165                \"misc-news\"                \"misc-news\"
1166              \"misc-mail\")))              \"misc-mail\")))
1167    
1168  Normally the group names returned by this variable should be  Normally the group names returned by this variable should be
1169  unprefixed -- which implicitly means \"store on the archive server\".  unprefixed -- which implicitly means \"store on the archive server\".
# Line 1009  variable instead." Line 1196  variable instead."
1196  This is a list where each element is a complete select method (see  This is a list where each element is a complete select method (see
1197  `gnus-select-method').  `gnus-select-method').
1198    
1199  If, for instance, you want to read your mail with the nnml backend,  If, for instance, you want to read your mail with the nnml back end,
1200  you could set this variable:  you could set this variable:
1201    
1202  \(setq gnus-secondary-select-methods '((nnml \"\")))"  \(setq gnus-secondary-select-methods '((nnml \"\")))"
# Line 1050  It can also be a list of select methods, Line 1237  It can also be a list of select methods,
1237  list, Gnus will try all the methods in the list until it finds a match."  list, Gnus will try all the methods in the list until it finds a match."
1238    :group 'gnus-server    :group 'gnus-server
1239    :type '(choice (const :tag "default" nil)    :type '(choice (const :tag "default" nil)
1240                   (const :tag "DejaNews" (nnweb "refer" (nnweb-type dejanews)))                   (const current)
1241                     (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1242                   gnus-select-method                   gnus-select-method
1243                   (repeat :menu-tag "Try multiple"                   (repeat :menu-tag "Try multiple"
1244                           :tag "Multiple"                           :tag "Multiple"
1245                           :value (current (nnweb "refer" (nnweb-type dejanews)))                           :value (current (nnweb "refer" (nnweb-type google)))
1246                           (choice :tag "Method"                           (choice :tag "Method"
1247                                   (const current)                                   (const current)
1248                                   (const :tag "DejaNews"                                   (const :tag "Google"
1249                                          (nnweb "refer" (nnweb-type dejanews)))                                          (nnweb "refer" (nnweb-type google)))
1250                                   gnus-select-method))))                                   gnus-select-method))))
1251    
1252  (defcustom gnus-group-faq-directory  (defcustom gnus-group-faq-directory
1253    '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"    '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
     "/ftp@sunsite.auc.dk:/pub/usenet/"  
1254      "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"      "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1255      "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"      "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1256      "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"      "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1257        "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1258      "/ftp@rtfm.mit.edu:/pub/usenet/"      "/ftp@rtfm.mit.edu:/pub/usenet/"
1259      "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"      "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1260      "/ftp@ftp.sunet.se:/pub/usenet/"      "/ftp@ftp.sunet.se:/pub/usenet/"
1261      "/ftp@nctuccca.edu.tw:/USENET/FAQ/"      "/ftp@nctuccca.nctu.edu.tw:/pub/Documents/rtfm/usenet-by-group/"
1262      "/ftp@hwarang.postech.ac.kr:/pub/usenet/"      "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1263      "/ftp@ftp.hk.super.net:/mirror/faqs/")      "/ftp@ftp.hk.super.net:/mirror/faqs/")
1264    "*Directory where the group FAQs are stored.    "*Directory where the group FAQs are stored.
# Line 1091  If the default site is too slow, try one Line 1279  If the default site is too slow, try one
1279                    ftp.seas.gwu.edu               /pub/rtfm                    ftp.seas.gwu.edu               /pub/rtfm
1280                    rtfm.mit.edu                   /pub/usenet                    rtfm.mit.edu                   /pub/usenet
1281     Europe:        ftp.uni-paderborn.de           /pub/FAQ     Europe:        ftp.uni-paderborn.de           /pub/FAQ
1282                    src.doc.ic.ac.uk               /usenet/news-FAQS                    src.doc.ic.ac.uk               /usenet/news-FAQS
1283                    ftp.sunet.se                   /pub/usenet                    ftp.sunet.se                   /pub/usenet
1284                    sunsite.auc.dk                 /pub/usenet                    ftp.pasteur.fr                 /pub/FAQ
1285     Asia:          nctuccca.edu.tw                /USENET/FAQ     Asia:          nctuccca.nctu.edu.tw           /pub/Documents/rtfm/usenet-by-group/
1286                    hwarang.postech.ac.kr          /pub/usenet                    hwarang.postech.ac.kr          /pub/usenet
1287                    ftp.hk.super.net               /mirror/faqs"                    ftp.hk.super.net               /mirror/faqs"
1288    :group 'gnus-group-various    :group 'gnus-group-various
1289    :type '(choice directory    :type '(choice directory
1290                   (repeat directory)))                   (repeat directory)))
1291    
1292    (defcustom gnus-group-charter-alist
1293      '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1294        ("de" . (concat "http://purl.net/charta/" name ".html"))
1295        ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1296        ("england" . (concat "http://england.news-admin.org/charters/" name))
1297        ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1298        ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1299                            (gnus-replace-in-string name "europa\\." "") ".html"))
1300        ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1301        ("aus" . (concat "http://aus.news-admin.org/groupinfo.cgi/" name))
1302        ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1303        ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1304        ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1305        ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1306        ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1307        ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1308                        (gnus-replace-in-string name "\\." "_") ".html"))
1309        ("milw" . (concat "http://usenet.mil.wi.us/"
1310                          (gnus-replace-in-string name "milw\\." "") "-charter"))
1311        ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1312        ("netins" . (concat "http://www.netins.net/usenet/charter/"
1313                            (gnus-replace-in-string name "\\." "-") "-charter.html")))
1314      "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1315    When FORM is evaluated `name' is bound to the name of the group."
1316      :group 'gnus-group-various
1317      :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1318    
1319    (defcustom gnus-group-fetch-control-use-browse-url nil
1320      "*Non-nil means that control messages are displayed using `browse-url'.
1321    Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1322    group."
1323      :group 'gnus-group-various
1324      :type 'boolean)
1325    
1326  (defcustom gnus-use-cross-reference t  (defcustom gnus-use-cross-reference t
1327    "*Non-nil means that cross referenced articles will be marked as read.    "*Non-nil means that cross referenced articles will be marked as read.
1328  If nil, ignore cross references.  If t, mark articles as read in  If nil, ignore cross references.  If t, mark articles as read in
# Line 1121  newsgroups." Line 1343  newsgroups."
1343  (defcustom gnus-large-newsgroup 200  (defcustom gnus-large-newsgroup 200
1344    "*The number of articles which indicates a large newsgroup.    "*The number of articles which indicates a large newsgroup.
1345  If the number of articles in a newsgroup is greater than this value,  If the number of articles in a newsgroup is greater than this value,
1346  confirmation is required for selecting the newsgroup."  confirmation is required for selecting the newsgroup.
1347    If it is nil, no confirmation is required."
1348    :group 'gnus-group-select    :group 'gnus-group-select
1349    :type 'integer)    :type '(choice (const :tag "No limit" nil)
1350                     integer))
1351    
1352  (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))  (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
1353    "*Non-nil means that the default name of a file to save articles in is the group name.    "*Non-nil means that the default name of a file to save articles in is the group name.
# Line 1139  Note that the default for this variable Line 1363  Note that the default for this variable
1363  type you're using.  On `usg-unix-v' and `xenix' this variable defaults  type you're using.  On `usg-unix-v' and `xenix' this variable defaults
1364  to nil while on all other systems it defaults to t."  to nil while on all other systems it defaults to t."
1365    :group 'gnus-start    :group 'gnus-start
1366    :type 'boolean)    :type '(radio (sexp :format "Non-nil\n"
1367                          :match (lambda (widget value)
1368                                   (and value (not (listp value))))
1369                          :value t)
1370                    (const nil)
1371                    (checklist (const :format "%v " not-score)
1372                               (const :format "%v " not-save)
1373                               (const not-kill))))
1374    
1375  (defcustom gnus-kill-files-directory gnus-directory  (defcustom gnus-kill-files-directory gnus-directory
1376    "*Name of the directory where kill files will be stored (default \"~/News\")."    "*Name of the directory where kill files will be stored (default \"~/News\")."
# Line 1188  cache to the full extent of the law." Line 1419  cache to the full extent of the law."
1419    :group 'gnus-meta    :group 'gnus-meta
1420    :type 'boolean)    :type 'boolean)
1421    
1422  (defcustom gnus-keep-backlog nil  (defcustom gnus-keep-backlog 20
1423    "*If non-nil, Gnus will keep read articles for later re-retrieval.    "*If non-nil, Gnus will keep read articles for later re-retrieval.
1424  If it is a number N, then Gnus will only keep the last N articles  If it is a number N, then Gnus will only keep the last N articles
1425  read.  If it is neither nil nor a number, Gnus will keep all read  read.  If it is neither nil nor a number, Gnus will keep all read
# Line 1214  articles.  This is not a good idea." Line 1445  articles.  This is not a good idea."
1445    :group 'gnus-meta    :group 'gnus-meta
1446    :type 'boolean)    :type 'boolean)
1447    
 (defcustom gnus-use-picons nil  
   "*If non-nil, display picons in a frame of their own."  
   :group 'gnus-meta  
   :type 'boolean)  
   
1448  (defcustom gnus-summary-prepare-exit-hook  (defcustom gnus-summary-prepare-exit-hook
1449    '(gnus-summary-expire-articles)    '(gnus-summary-expire-articles)
1450    "*A hook called when preparing to exit from the summary buffer.    "*A hook called when preparing to exit from the summary buffer.
# Line 1227  It calls `gnus-summary-expire-articles' Line 1453  It calls `gnus-summary-expire-articles'
1453    :type 'hook)    :type 'hook)
1454    
1455  (defcustom gnus-novice-user t  (defcustom gnus-novice-user t
1456    "*Non-nil means that you are a usenet novice.    "*Non-nil means that you are a Usenet novice.
1457  If non-nil, verbose messages may be displayed and confirmations may be  If non-nil, verbose messages may be displayed and confirmations may be
1458  required."  required."
1459    :group 'gnus-meta    :group 'gnus-meta
# Line 1267  slower." Line 1493  slower."
1493    :type 'boolean)    :type 'boolean)
1494    
1495  (defcustom gnus-shell-command-separator ";"  (defcustom gnus-shell-command-separator ";"
1496    "String used to separate to shell commands."    "String used to separate shell commands."
1497    :group 'gnus-files    :group 'gnus-files
1498    :type 'string)    :type 'string)
1499    
# Line 1276  slower." Line 1502  slower."
1502      ("nnspool" post address)      ("nnspool" post address)
1503      ("nnvirtual" post-mail virtual prompt-address)      ("nnvirtual" post-mail virtual prompt-address)
1504      ("nnmbox" mail respool address)      ("nnmbox" mail respool address)
1505      ("nnml" mail respool address)      ("nnml" post-mail respool address)
1506      ("nnmh" mail respool address)      ("nnmh" mail respool address)
1507      ("nndir" post-mail prompt-address physical-address)      ("nndir" post-mail prompt-address physical-address)
1508      ("nneething" none address prompt-address physical-address)      ("nneething" none address prompt-address physical-address)
# Line 1288  slower." Line 1514  slower."
1514      ("nnfolder" mail respool address)      ("nnfolder" mail respool address)
1515      ("nngateway" post-mail address prompt-address physical-address)      ("nngateway" post-mail address prompt-address physical-address)
1516      ("nnweb" none)      ("nnweb" none)
1517        ("nngoogle" post)
1518      ("nnslashdot" post)      ("nnslashdot" post)
1519      ("nnultimate" none)      ("nnultimate" none)
1520        ("nnrss" none)
1521        ("nnwfm" none)
1522      ("nnwarchive" none)      ("nnwarchive" none)
1523      ("nnlistserv" none)      ("nnlistserv" none)
1524      ("nnagent" post-mail)      ("nnagent" post-mail)
1525      ("nnimap" post-mail address prompt-address physical-address))      ("nnimap" post-mail address prompt-address physical-address)
1526        ("nnmaildir" mail respool address)
1527        ("nnnil" none))
1528    "*An alist of valid select methods.    "*An alist of valid select methods.
1529  The first element of each list lists should be a string with the name  The first element of each list lists should be a string with the name
1530  of the select method.  The other elements may be the category of  of the select method.  The other elements may be the category of
# Line 1332  this variable. I think." Line 1563  this variable. I think."
1563                      :inline t                      :inline t
1564                      (list :format "%v"                      (list :format "%v"
1565                            variable                            variable
1566                            (sexp :tag "Value"))))                            (sexp :tag "Value"))))))
     ))  
1567    
1568  (gnus-redefine-select-method-widget)  (gnus-redefine-select-method-widget)
1569    
# Line 1353  If this variable is nil, screen refresh Line 1583  If this variable is nil, screen refresh
1583  (defcustom gnus-mode-non-string-length nil  (defcustom gnus-mode-non-string-length nil
1584    "*Max length of mode-line non-string contents.    "*Max length of mode-line non-string contents.
1585  If this is nil, Gnus will take space as is needed, leaving the rest  If this is nil, Gnus will take space as is needed, leaving the rest
1586  of the modeline intact.  Note that the default of nil is unlikely  of the mode line intact.  Note that the default of nil is unlikely
1587  to be desirable; see the manual for further details."  to be desirable; see the manual for further details."
1588    :group 'gnus-various    :group 'gnus-various
1589    :type '(choice (const nil)    :type '(choice (const nil)
1590                   integer))                   integer))
1591    
1592  (defcustom gnus-auto-expirable-newsgroups nil  ;; There should be special validation for this.
1593    "*Groups in which to automatically mark read articles as expirable.  (define-widget 'gnus-email-address 'string
1594      "An email address.")
1595    
1596    (gnus-define-group-parameter
1597     to-address
1598     :function-document
1599     "Return GROUP's to-address."
1600     :variable-document
1601     "*Alist of group regexps and correspondent to-addresses."
1602     :variable-group gnus-group-parameter
1603     :parameter-type '(gnus-email-address :tag "To Address")
1604     :parameter-document "\
1605    This will be used when doing followups and posts.
1606    
1607    This is primarily useful in mail groups that represent closed
1608    mailing lists--mailing lists where it's expected that everybody that
1609    writes to the mailing list is subscribed to it.  Since using this
1610    parameter ensures that the mail only goes to the mailing list itself,
1611    it means that members won't receive two copies of your followups.
1612    
1613    Using `to-address' will actually work whether the group is foreign or
1614    not.  Let's say there's a group on the server that is called
1615    `fa.4ad-l'.  This is a real newsgroup, but the server has gotten the
1616    articles from a mail-to-news gateway.  Posting directly to this group
1617    is therefore impossible--you have to send mail to the mailing list
1618    address instead.
1619    
1620    The gnus-group-split mail splitting mechanism will behave as if this
1621    address was listed in gnus-group-split Addresses (see below).")
1622    
1623    (gnus-define-group-parameter
1624     to-list
1625     :function-document
1626     "Return GROUP's to-list."
1627     :variable-document
1628     "*Alist of group regexps and correspondent to-lists."
1629     :variable-group gnus-group-parameter
1630     :parameter-type '(gnus-email-address :tag "To List")
1631     :parameter-document "\
1632    This address will be used when doing a `a' in the group.
1633    
1634    It is totally ignored when doing a followup--except that if it is
1635    present in a news group, you'll get mail group semantics when doing
1636    `f'.
1637    
1638    The gnus-group-split mail splitting mechanism will behave as if this
1639    address was listed in gnus-group-split Addresses (see below).")
1640    
1641    (gnus-define-group-parameter
1642     subscribed
1643     :type bool
1644     :function-document
1645     "Return GROUP's subscription status."
1646     :variable-document
1647     "*Groups which are automatically considered subscribed."
1648     :variable-group gnus-group-parameter
1649     :parameter-type '(const :tag "Subscribed" t)
1650     :parameter-document "\
1651    Gnus assumed that you are subscribed to the To/List address.
1652    
1653    When constructing a list of subscribed groups using
1654    `gnus-find-subscribed-addresses', Gnus includes the To address given
1655    above, or the list address (if the To address has not been set).")
1656    
1657    (gnus-define-group-parameter
1658     auto-expire
1659     :type bool
1660     :function gnus-group-auto-expirable-p
1661     :function-document
1662     "Check whether GROUP is auto-expirable or not."
1663     :variable gnus-auto-expirable-newsgroups
1664     :variable-default nil
1665     :variable-document
1666     "*Groups in which to automatically mark read articles as expirable.
1667  If non-nil, this should be a regexp that should match all groups in  If non-nil, this should be a regexp that should match all groups in
1668  which to perform auto-expiry.  This only makes sense for mail groups."  which to perform auto-expiry.  This only makes sense for mail groups."
1669    :group 'nnmail-expire   :variable-group nnmail-expire
1670    :type '(choice (const nil)   :variable-type '(choice (const nil)
1671                   regexp))                           regexp)
1672     :parameter-type '(const :tag "Automatic Expire" t)
1673  (defcustom gnus-total-expirable-newsgroups nil   :parameter-document
1674    "*Groups in which to perform expiry of all read articles.   "All articles that are read will be marked as expirable.")
1675    
1676    (gnus-define-group-parameter
1677     total-expire
1678     :type bool
1679     :function gnus-group-total-expirable-p
1680     :function-document
1681     "Check whether GROUP is total-expirable or not."
1682     :variable gnus-total-expirable-newsgroups
1683     :variable-default nil
1684     :variable-document
1685     "*Groups in which to perform expiry of all read articles.
1686  Use with extreme caution.  All groups that match this regexp will be  Use with extreme caution.  All groups that match this regexp will be
1687  expiring - which means that all read articles will be deleted after  expiring - which means that all read articles will be deleted after
1688  \(say) one week.         (This only goes for mail groups and the like, of  \(say) one week.         (This only goes for mail groups and the like, of
1689  course.)"  course.)"
1690    :group 'nnmail-expire   :variable-group nnmail-expire
1691    :type '(choice (const nil)   :variable-type '(choice (const nil)
1692                   regexp))                           regexp)
1693     :parameter-type '(const :tag "Total Expire" t)
1694     :parameter-document
1695     "All read articles will be put through the expiry process
1696    
1697    This happens even if they are not marked as expirable.
1698    Use with caution.")
1699    
1700    (gnus-define-group-parameter
1701     charset
1702     :function-document
1703     "Return the default charset of GROUP."
1704     :variable gnus-group-charset-alist
1705     :variable-default
1706     '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
1707       ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
1708       ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
1709       ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
1710       ("\\(^\\|:\\)relcom\\>" koi8-r)
1711       ("\\(^\\|:\\)fido7\\>" koi8-r)
1712       ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
1713       ("\\(^\\|:\\)israel\\>" iso-8859-1)
1714       ("\\(^\\|:\\)han\\>" euc-kr)
1715       ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
1716       ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
1717       ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
1718     :variable-document
1719     "Alist of regexps (to match group names) and default charsets to be used when reading."
1720     :variable-group gnus-charset
1721     :variable-type '(repeat (list (regexp :tag "Group")
1722                                   (symbol :tag "Charset")))
1723     :parameter-type '(symbol :tag "Charset")
1724     :parameter-document "\
1725    The default charset to use in the group.")
1726    
1727    (gnus-define-group-parameter
1728     post-method
1729     :type list
1730     :function-document
1731     "Return a posting method for GROUP."
1732     :variable gnus-post-method-alist
1733     :variable-document
1734     "Alist of regexps (to match group names) and method to be used when
1735    posting an article."
1736     :variable-group gnus-group-foreign
1737     :parameter-type
1738     '(choice :tag "Posting Method"
1739              (const :tag "Use native server" native)
1740              (const :tag "Use current server" current)
1741              (list :convert-widget
1742                    (lambda (widget)
1743                      (list 'sexp :tag "Methods"
1744                            :value gnus-select-method))))
1745     :parameter-document
1746     "Posting method for this group.")
1747    
1748    (gnus-define-group-parameter
1749     large-newsgroup-initial
1750     :type integer
1751     :function-document
1752     "Return GROUP's initial input of the number of articles."
1753     :variable-document
1754     "*Alist of group regexps and its initial input of the number of articles."
1755     :variable-group gnus-group-parameter
1756     :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
1757                              (const :tag "All" nil)
1758                              (integer))
1759     :parameter-document "\
1760    
1761    This number will be prompted as the initial value of the number of
1762    articles to list when the group is a large newsgroup (see
1763    `gnus-large-newsgroup').  If it is nil, the default value is the
1764    total number of articles in the group.")
1765    
1766    ;; The Gnus registry's ignored groups
1767    (gnus-define-group-parameter
1768     registry-ignore
1769     :type list
1770     :function-document
1771     "Whether this group should be ignored by the registry."
1772     :variable gnus-registry-ignored-groups
1773     :variable-default nil
1774     :variable-document
1775     "*Groups in which the registry should be turned off."
1776     :variable-group gnus-registry
1777     :variable-type '(repeat
1778                      (list
1779                       (regexp :tag "Group Name Regular Expression")
1780                       (boolean :tag "Ignored")))
1781    
1782     :parameter-type '(boolean :tag "Group Ignored by the Registry")
1783     :parameter-document
1784     "Whether the Gnus Registry should ignore this group.")
1785    
1786    ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
1787    (defcustom gnus-install-group-spam-parameters t
1788      "*Disable the group parameters for spam detection.
1789    Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
1790      :type 'boolean
1791      :group 'gnus-start)
1792    
1793    (when gnus-install-group-spam-parameters
1794      (defvar gnus-group-spam-classification-spam t
1795        "Spam group classification (requires spam.el).
1796    This group contains spam messages.  On summary entry, unread messages
1797    will be marked as spam.  On summary exit, the specified spam
1798    processors will be invoked on spam-marked messages, then those
1799    messages will be expired, so the spam processor will only see a
1800    spam-marked message once.")
1801    
1802      (defvar gnus-group-spam-classification-ham 'ask
1803        "The ham value for the spam group parameter (requires spam.el).
1804    On summary exit, the specified ham processors will be invoked on
1805    ham-marked messages.  Exercise caution, since the ham processor will
1806    see the same message more than once because there is no ham message
1807    registry.")
1808    
1809      (gnus-define-group-parameter
1810       spam-contents
1811       :type list
1812       :function-document
1813       "The spam type (spam, ham, or neither) of the group."
1814       :variable gnus-spam-newsgroup-contents
1815       :variable-default nil
1816       :variable-document
1817       "*Groups in which to automatically mark new articles as spam on
1818    summary entry.  If non-nil, this should be a list of group name
1819    regexps that should match all groups in which to do automatic spam
1820    tagging, associated with a classification (spam, ham, or neither).
1821    This only makes sense for mail groups."
1822       :variable-group spam
1823       :variable-type '(repeat
1824                        (list :tag "Group contents spam/ham classification"
1825                              (regexp :tag "Group")
1826                              (choice
1827                               (variable-item gnus-group-spam-classification-spam)
1828                               (variable-item gnus-group-spam-classification-ham)
1829                               (const :tag "Unclassified" nil))))
1830    
1831       :parameter-type '(list :tag "Group contents spam/ham classification"
1832                              (choice :tag "Group contents classification for spam sorting"
1833                                      (variable-item gnus-group-spam-classification-spam)
1834                                      (variable-item gnus-group-spam-classification-ham)
1835                                      (const :tag "Unclassified" nil)))
1836       :parameter-document
1837       "The spam classification (spam, ham, or neither) of this group.
1838    When a spam group is entered, all unread articles are marked as spam.")
1839    
1840      (defvar gnus-group-spam-exit-processor-ifile "ifile"
1841        "OBSOLETE: The ifile summary exit spam processor.")
1842    
1843      (defvar gnus-group-spam-exit-processor-stat "stat"
1844        "OBSOLETE: The spam-stat summary exit spam processor.")
1845    
1846      (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
1847        "OBSOLETE: The Bogofilter summary exit spam processor.")
1848    
1849      (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
1850        "OBSOLETE: The Blacklist summary exit spam processor.")
1851    
1852      (defvar gnus-group-spam-exit-processor-report-gmane "report-gmane"
1853        "OBSOLETE: The Gmane reporting summary exit spam processor.
1854    Only applicable to NNTP groups with articles from Gmane.  See spam-report.el")
1855    
1856      (defvar gnus-group-spam-exit-processor-spamoracle "spamoracle-spam"
1857        "OBSOLETE: The spamoracle summary exit spam processor.")
1858    
1859      (defvar gnus-group-ham-exit-processor-ifile "ifile-ham"
1860        "OBSOLETE: The ifile summary exit ham processor.
1861    Only applicable to non-spam (unclassified and ham) groups.")
1862    
1863      (defvar gnus-group-ham-exit-processor-bogofilter "bogofilter-ham"
1864        "OBSOLETE: The Bogofilter summary exit ham processor.
1865    Only applicable to non-spam (unclassified and ham) groups.")
1866    
1867      (defvar gnus-group-ham-exit-processor-stat "stat-ham"
1868        "OBSOLETE: The spam-stat summary exit ham processor.
1869    Only applicable to non-spam (unclassified and ham) groups.")
1870    
1871      (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
1872        "OBSOLETE: The whitelist summary exit ham processor.
1873    Only applicable to non-spam (unclassified and ham) groups.")
1874    
1875      (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
1876        "OBSOLETE: The BBDB summary exit ham processor.
1877    Only applicable to non-spam (unclassified and ham) groups.")
1878    
1879      (defvar gnus-group-ham-exit-processor-copy "copy"
1880        "OBSOLETE: The ham copy exit ham processor.
1881    Only applicable to non-spam (unclassified and ham) groups.")
1882    
1883      (defvar gnus-group-ham-exit-processor-spamoracle "spamoracle-ham"
1884        "OBSOLETE: The spamoracle summary exit ham processor.
1885    Only applicable to non-spam (unclassified and ham) groups.")
1886    
1887      (gnus-define-group-parameter
1888       spam-process
1889       :type list
1890       :parameter-type
1891       '(choice
1892         :tag "Spam Summary Exit Processor"
1893         :value nil
1894         (list :tag "Spam Summary Exit Processor Choices"
1895               (set
1896                (variable-item gnus-group-spam-exit-processor-ifile)
1897                (variable-item gnus-group-spam-exit-processor-stat)
1898                (variable-item gnus-group-spam-exit-processor-bogofilter)
1899                (variable-item gnus-group-spam-exit-processor-blacklist)
1900                (variable-item gnus-group-spam-exit-processor-spamoracle)
1901                (variable-item gnus-group-spam-exit-processor-report-gmane)
1902                (variable-item gnus-group-ham-exit-processor-bogofilter)
1903                (variable-item gnus-group-ham-exit-processor-ifile)
1904                (variable-item gnus-group-ham-exit-processor-stat)
1905                (variable-item gnus-group-ham-exit-processor-whitelist)
1906                (variable-item gnus-group-ham-exit-processor-BBDB)
1907                (variable-item gnus-group-ham-exit-processor-spamoracle)
1908                (variable-item gnus-group-ham-exit-processor-copy)
1909                (const :tag "Spam: Gmane Report"  (spam spam-use-gmane))
1910                (const :tag "Spam: Bogofilter"    (spam spam-use-bogofilter))
1911                (const :tag "Spam: Blacklist"     (spam spam-use-blacklist))
1912                (const :tag "Spam: ifile"         (spam spam-use-ifile))
1913                (const :tag "Spam: Spam-stat"     (spam spam-use-stat))
1914                (const :tag "Spam: Spam Oracle"   (spam spam-use-spamoracle))
1915                (const :tag "Ham: ifile"          (ham spam-use-ifile))
1916                (const :tag "Ham: Bogofilter"     (ham spam-use-bogofilter))
1917                (const :tag "Ham: Spam-stat"      (ham spam-use-stat))
1918                (const :tag "Ham: Whitelist"      (ham spam-use-whitelist))
1919                (const :tag "Ham: BBDB"           (ham spam-use-BBDB))
1920                (const :tag "Ham: Copy"           (ham spam-use-ham-copy))
1921                (const :tag "Ham: Spam Oracle"    (ham spam-use-spamoracle)))))
1922       :function-document
1923       "Which spam or ham processors will be applied when the summary is exited."
1924       :variable gnus-spam-process-newsgroups
1925       :variable-default nil
1926       :variable-document
1927       "*Groups in which to automatically process spam or ham articles with
1928    a backend on summary exit.  If non-nil, this should be a list of group
1929    name regexps that should match all groups in which to do automatic
1930    spam processing, associated with the appropriate processor."
1931       :variable-group spam
1932       :variable-type
1933       '(repeat :tag "Spam/Ham Processors"
1934                (list :tag "Spam Summary Exit Processor Choices"
1935                      (regexp :tag "Group Regexp")
1936                      (set
1937                       :tag "Spam/Ham Summary Exit Processor"
1938                       (variable-item gnus-group-spam-exit-processor-ifile)
1939                       (variable-item gnus-group-spam-exit-processor-stat)
1940                       (variable-item gnus-group-spam-exit-processor-bogofilter)
1941                       (variable-item gnus-group-spam-exit-processor-blacklist)
1942                       (variable-item gnus-group-spam-exit-processor-spamoracle)
1943                       (variable-item gnus-group-spam-exit-processor-report-gmane)
1944                       (variable-item gnus-group-ham-exit-processor-bogofilter)
1945                       (variable-item gnus-group-ham-exit-processor-ifile)
1946                       (variable-item gnus-group-ham-exit-processor-stat)
1947                       (variable-item gnus-group-ham-exit-processor-whitelist)
1948                       (variable-item gnus-group-ham-exit-processor-BBDB)
1949                       (variable-item gnus-group-ham-exit-processor-spamoracle)
1950                       (variable-item gnus-group-ham-exit-processor-copy)
1951                       (const :tag "Spam: Gmane Report"  (spam spam-use-gmane))
1952                       (const :tag "Spam: Bogofilter"    (spam spam-use-bogofilter))
1953                       (const :tag "Spam: Blacklist"     (spam spam-use-blacklist))
1954                       (const :tag "Spam: ifile"         (spam spam-use-ifile))
1955                       (const :tag "Spam: Spam-stat"     (spam spam-use-stat))
1956                       (const :tag "Spam: Spam Oracle"   (spam spam-use-spamoracle))
1957                       (const :tag "Ham: ifile"          (ham spam-use-ifile))
1958                       (const :tag "Ham: Bogofilter"     (ham spam-use-bogofilter))
1959                       (const :tag "Ham: Spam-stat"      (ham spam-use-stat))
1960                       (const :tag "Ham: Whitelist"      (ham spam-use-whitelist))
1961                       (const :tag "Ham: BBDB"           (ham spam-use-BBDB))
1962                       (const :tag "Ham: Copy"           (ham spam-use-ham-copy))
1963                       (const :tag "Ham: Spam Oracle"    (ham spam-use-spamoracle)))))
1964    
1965       :parameter-document
1966       "Which spam or ham processors will be applied when the summary is exited.")
1967    
1968      (gnus-define-group-parameter
1969       spam-autodetect
1970       :type list
1971       :parameter-type
1972       '(boolean :tag "Spam autodetection")
1973       :function-document
1974       "Should spam be autodetected (with spam-split) in this group?"
1975       :variable gnus-spam-autodetect
1976       :variable-default nil
1977       :variable-document
1978       "*Groups in which spam should be autodetected when they are entered.
1979       Only unseen articles will be examined, unless
1980       spam-autodetect-recheck-messages is set."
1981       :variable-group spam
1982       :variable-type
1983       '(repeat
1984         :tag "Autodetection setting"
1985         (list
1986          (regexp :tag "Group Regexp")
1987          boolean))
1988       :parameter-document
1989       "Spam autodetection.
1990    Only unseen articles will be examined, unless
1991    spam-autodetect-recheck-messages is set.")
1992    
1993      (gnus-define-group-parameter
1994       spam-autodetect-methods
1995       :type list
1996       :parameter-type
1997       '(choice :tag "Spam autodetection-specific methods"
1998         (const none)
1999         (const default)
2000         (set :tag "Use specific methods"
2001              (variable-item spam-use-blacklist)
2002              (variable-item spam-use-regex-headers)
2003              (variable-item spam-use-regex-body)
2004              (variable-item spam-use-whitelist)
2005              (variable-item spam-use-BBDB)
2006              (variable-item spam-use-ifile)
2007              (variable-item spam-use-spamoracle)
2008              (variable-item spam-use-stat)
2009              (variable-item spam-use-blackholes)
2010              (variable-item spam-use-hashcash)
2011              (variable-item spam-use-bogofilter-headers)
2012              (variable-item spam-use-bogofilter)))
2013       :function-document
2014       "Methods to be used for autodetection in each group"
2015       :variable gnus-spam-autodetect-methods
2016       :variable-default nil
2017       :variable-document
2018       "*Methods for autodetecting spam per group.
2019    Requires the spam-autodetect parameter.  Only unseen articles
2020    will be examined, unless spam-autodetect-recheck-messages is
2021    set."
2022       :variable-group spam
2023       :variable-type
2024       '(repeat
2025         :tag "Autodetection methods"
2026         (list
2027          (regexp :tag "Group Regexp")
2028          (choice
2029           (const none)
2030           (const default)
2031           (set :tag "Use specific methods"
2032            (variable-item spam-use-blacklist)
2033            (variable-item spam-use-regex-headers)
2034            (variable-item spam-use-regex-body)
2035            (variable-item spam-use-whitelist)
2036            (variable-item spam-use-BBDB)
2037            (variable-item spam-use-ifile)
2038            (variable-item spam-use-spamoracle)
2039            (variable-item spam-use-stat)
2040            (variable-item spam-use-blackholes)
2041            (variable-item spam-use-hashcash)
2042            (variable-item spam-use-bogofilter-headers)
2043            (variable-item spam-use-bogofilter)))))
2044         :parameter-document
2045       "Spam autodetection methods.  
2046    Requires the spam-autodetect parameter.  Only unseen articles
2047    will be examined, unless spam-autodetect-recheck-messages is
2048    set.")
2049    
2050      (gnus-define-group-parameter
2051       spam-process-destination
2052       :type list
2053       :parameter-type
2054       '(choice :tag "Destination for spam-processed articles at summary exit"
2055                (string :tag "Move to a group")
2056                (repeat :tag "Move to multiple groups"
2057                        (string :tag "Destination group"))
2058                (const :tag "Expire" nil))
2059       :function-document
2060       "Where spam-processed articles will go at summary exit."
2061       :variable gnus-spam-process-destinations
2062       :variable-default nil
2063       :variable-document
2064       "*Groups in which to explicitly send spam-processed articles to
2065    another group, or expire them (the default).  If non-nil, this should
2066    be a list of group name regexps that should match all groups in which
2067    to do spam-processed article moving, associated with the destination
2068    group or nil for explicit expiration.  This only makes sense for
2069    mail groups."
2070       :variable-group spam
2071       :variable-type
2072       '(repeat
2073         :tag "Spam-processed articles destination"
2074         (list
2075          (regexp :tag "Group Regexp")
2076          (choice
2077           :tag "Destination for spam-processed articles at summary exit"
2078           (string :tag "Move to a group")
2079           (repeat :tag "Move to multiple groups"
2080                   (string :tag "Destination group"))
2081           (const :tag "Expire" nil))))
2082       :parameter-document
2083       "Where spam-processed articles will go at summary exit.")
2084      
2085      (gnus-define-group-parameter
2086       ham-process-destination
2087       :type list
2088       :parameter-type
2089       '(choice
2090         :tag "Destination for ham articles at summary exit from a spam group"
2091         (string :tag "Move to a group")
2092         (repeat :tag "Move to multiple groups"
2093                 (string :tag "Destination group"))
2094         (const :tag "Respool" respool)
2095         (const :tag "Do nothing" nil))
2096       :function-document
2097       "Where ham articles will go at summary exit from a spam group."
2098       :variable gnus-ham-process-destinations
2099       :variable-default nil
2100       :variable-document
2101       "*Groups in which to explicitly send ham articles to
2102    another group, or do nothing (the default).  If non-nil, this should
2103    be a list of group name regexps that should match all groups in which
2104    to do ham article moving, associated with the destination
2105    group or nil for explicit ignoring.  This only makes sense for
2106    mail groups, and only works in spam groups."
2107       :variable-group spam
2108       :variable-type
2109       '(repeat
2110         :tag "Ham articles destination"
2111         (list
2112          (regexp :tag "Group Regexp")
2113          (choice
2114           :tag "Destination for ham articles at summary exit from spam group"
2115           (string :tag "Move to a group")
2116           (repeat :tag "Move to multiple groups"
2117                    (string :tag "Destination group"))
2118           (const :tag "Respool" respool)
2119           (const :tag "Expire" nil))))
2120       :parameter-document
2121       "Where ham articles will go at summary exit from a spam group.")
2122    
2123      (gnus-define-group-parameter
2124       ham-marks
2125       :type 'list
2126       :parameter-type '(list :tag "Ham mark choices"
2127                              (set
2128                               (variable-item gnus-del-mark)
2129                               (variable-item gnus-read-mark)
2130                               (variable-item gnus-ticked-mark)
2131                               (variable-item gnus-killed-mark)
2132                               (variable-item gnus-kill-file-mark)
2133                               (variable-item gnus-low-score-mark)))
2134    
2135       :parameter-document
2136       "Marks considered ham (positively not spam).  Such articles will be
2137    processed as ham (non-spam) on group exit.  When nil, the global
2138    spam-ham-marks variable takes precedence."
2139       :variable-default '((".*" ((gnus-del-mark
2140                                   gnus-read-mark
2141                                   gnus-killed-mark
2142                                   gnus-kill-file-mark
2143                                   gnus-low-score-mark))))
2144       :variable-group spam
2145       :variable-document
2146       "*Groups in which to explicitly set the ham marks to some value.")
2147    
2148      (gnus-define-group-parameter
2149       spam-marks
2150       :type 'list
2151       :parameter-type '(list :tag "Spam mark choices"
2152                              (set
2153                               (variable-item gnus-spam-mark)
2154                               (variable-item gnus-killed-mark)
2155                               (variable-item gnus-kill-file-mark)
2156                               (variable-item gnus-low-score-mark)))
2157    
2158       :parameter-document
2159       "Marks considered spam.
2160    Such articles will be processed as spam on group exit.  When nil, the global
2161    spam-spam-marks variable takes precedence."
2162       :variable-default '((".*" ((gnus-spam-mark))))
2163       :variable-group spam
2164       :variable-document
2165       "*Groups in which to explicitly set the spam marks to some value."))
2166    
2167  (defcustom gnus-group-uncollapsed-levels 1  (defcustom gnus-group-uncollapsed-levels 1
2168    "Number of group name elements to leave alone when making a short group name."    "Number of group name elements to leave alone when making a short group name."
# Line 1466  and `grouplens-menu'." Line 2253  and `grouplens-menu'."
2253                (const pick-menu)                (const pick-menu)
2254                (const grouplens-menu)))                (const grouplens-menu)))
2255    
2256    ;; Byte-compiler warning.
2257    (defvar gnus-visual)
2258    ;; Find out whether the gnus-visual TYPE is wanted.
2259    (defun gnus-visual-p (&optional type class)
2260      (and gnus-visual                      ; Has to be non-nil, at least.
2261           (if (not type)                   ; We don't care about type.
2262               gnus-visual
2263             (if (listp gnus-visual)        ; It's a list, so we check it.
2264                 (or (memq type gnus-visual)
2265                     (memq class gnus-visual))
2266               t))))
2267    
2268  (defcustom gnus-mouse-face  (defcustom gnus-mouse-face
2269    (condition-case ()    (condition-case ()
2270        (if (gnus-visual-p 'mouse-face 'highlight)        (if (gnus-visual-p 'mouse-face 'highlight)
# Line 1488  face." Line 2287  face."
2287  (defvar gnus-plugged t  (defvar gnus-plugged t
2288    "Whether Gnus is plugged or not.")    "Whether Gnus is plugged or not.")
2289    
2290  (defcustom gnus-default-charset 'iso-8859-1  (defcustom gnus-agent-cache t
2291      "Controls use of the agent cache while plugged.
2292    When set, Gnus will prefer using the locally stored content rather
2293    than re-fetching it from the server.  You also need to enable
2294    `gnus-agent' for this to have any affect."
2295      :version "21.3"
2296      :group 'gnus-agent
2297      :type 'boolean)
2298    
2299    (defcustom gnus-default-charset 'undecided
2300    "Default charset assumed to be used when viewing non-ASCII characters.    "Default charset assumed to be used when viewing non-ASCII characters.
2301  This variable is overridden on a group-to-group basis by the  This variable is overridden on a group-to-group basis by the
2302  gnus-group-charset-alist variable and is only used on groups not  `gnus-group-charset-alist' variable and is only used on groups not
2303  covered by that variable."  covered by that variable."
2304    :type 'symbol    :type 'symbol
2305    :group 'gnus-charset)    :group 'gnus-charset)
2306    
2307  (defcustom gnus-default-posting-charset nil  ;; Fixme: Doc reference to agent.
2308    "Default charset assumed to be used when posting non-ASCII characters.  (defcustom gnus-agent t
2309  This variable is overridden on a group-to-group basis by the    "Whether we want to use the Gnus agent or not.
2310  gnus-group-posting-charset-alist variable and is only used on groups not  
2311  covered by that variable.  You may customize gnus-agent to disable its use.  However, some
2312  If nil, no default charset is assumed when posting."  back ends have started to use the agent as a client-side cache.
2313    :type 'symbol  Disabling the agent may result in noticeable loss of performance."
2314    :group 'gnus-charset)    :version "21.3"
2315      :group 'gnus-agent
2316      :type 'boolean)
2317    
2318    (defcustom gnus-other-frame-function 'gnus
2319      "Function called by the command `gnus-other-frame'."
2320      :group 'gnus-start
2321      :type '(choice (function-item gnus)
2322                     (function-item gnus-no-server)
2323                     (function-item gnus-slave)
2324                     (function-item gnus-slave-no-server)))
2325    
2326    (defcustom gnus-other-frame-parameters nil
2327      "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
2328    This should be an alist for Emacs, or a plist for XEmacs."
2329      :group 'gnus-start
2330      :type (if (featurep 'xemacs)
2331                '(repeat (list :inline t :format "%v"
2332                               (symbol :tag "Property")
2333                               (sexp :tag "Value")))
2334              '(repeat (cons :format "%v"
2335                             (symbol :tag "Parameter")
2336                             (sexp :tag "Value")))))
2337    
2338    (defcustom gnus-user-agent 'emacs-gnus-type
2339      "Which information should be exposed in the User-Agent header.
2340    
2341    It can be one of the symbols `gnus' \(show only Gnus version\), `emacs-gnus'
2342    \(show only Emacs and Gnus versions\), `emacs-gnus-config' \(same as
2343    `emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as
2344    `emacs-gnus' plus system type\) or a custom string.  If you set it to a
2345    string, be sure to use a valid format, see RFC 2616."
2346      :group 'gnus-message
2347      :type '(choice
2348              (item :tag "Show Gnus and Emacs versions and system type"
2349                    emacs-gnus-type)
2350              (item :tag "Show Gnus and Emacs versions and system configuration"
2351                    emacs-gnus-config)
2352              (item :tag "Show Gnus and Emacs versions" emacs-gnus)
2353              (item :tag "Show only Gnus version" gnus)
2354              (string :tag "Other")))
2355    
2356    
2357  ;;; Internal variables  ;;; Internal variables
2358    
2359  (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")  (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
2360  (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")  (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
2361    (defvar gnus-agent-method-p-cache nil
2362      ; Reset each time gnus-agent-covered-methods is changed else
2363      ; gnus-agent-method-p may mis-report a methods status.
2364      )
2365    (defvar gnus-agent-target-move-group-header "X-Gnus-Agent-Move-To")
2366    (defvar gnus-draft-meta-information-header "X-Draft-From")
2367  (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)  (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
2368  (defvar gnus-original-article-buffer " *Original Article*")  (defvar gnus-original-article-buffer " *Original Article*")
2369  (defvar gnus-newsgroup-name nil)  (defvar gnus-newsgroup-name nil)
2370  (defvar gnus-ephemeral-servers nil)  (defvar gnus-ephemeral-servers nil)
2371    (defvar gnus-server-method-cache nil)
 (defvar gnus-agent nil  
   "Whether we want to use the Gnus agent or not.")  
2372    
2373  (defvar gnus-agent-fetching nil  (defvar gnus-agent-fetching nil
2374    "Whether Gnus agent is in fetching mode.")    "Whether Gnus agent is in fetching mode.")
2375    
2376    (defvar gnus-agent-covered-methods nil
2377      "A list of servers, NOT methods, showing which servers are covered by the agent.")
2378    
2379  (defvar gnus-command-method nil  (defvar gnus-command-method nil
2380    "Dynamically bound variable that says what the current backend is.")    "Dynamically bound variable that says what the current back end is.")
2381    
2382  (defvar gnus-current-select-method nil  (defvar gnus-current-select-method nil
2383    "The current method for selecting a newsgroup.")    "The current method for selecting a newsgroup.")
# Line 1560  If nil, no default charset is assumed wh Line 2415  If nil, no default charset is assumed wh
2415        ,(nnheader-concat gnus-cache-directory "active"))))        ,(nnheader-concat gnus-cache-directory "active"))))
2416    "List of predefined (convenience) servers.")    "List of predefined (convenience) servers.")
2417    
2418  (defvar gnus-topic-indentation "");; Obsolete variable.  (defvar gnus-topic-indentation "") ;; Obsolete variable.
2419    
2420  (defconst gnus-article-mark-lists  (defconst gnus-article-mark-lists
2421    '((marked . tick) (replied . reply)    '((marked . tick) (replied . reply)
# Line 1568  If nil, no default charset is assumed wh Line 2423  If nil, no default charset is assumed wh
2423      (bookmarks . bookmark) (dormant . dormant)      (bookmarks . bookmark) (dormant . dormant)
2424      (scored . score) (saved . save)      (scored . score) (saved . save)
2425      (cached . cache) (downloadable . download)      (cached . cache) (downloadable . download)
2426      (unsendable . unsend)))      (unsendable . unsend) (forwarded . forward)
2427        (recent . recent) (seen . seen)))
2428    
2429    (defconst gnus-article-special-mark-lists
2430      '((seen range)
2431        (killed range)
2432        (bookmark tuple)
2433        (score tuple)))
2434    
2435    ;; Propagate flags to server, with the following exceptions:
2436    ;; `seen' is private to each gnus installation
2437    ;; `cache' is a internal gnus flag for each gnus installation
2438    ;; `download' is a agent flag private to each gnus installation
2439    ;; `unsend' are for nndraft groups only
2440    ;; `score' is not a proper mark
2441    ;; `bookmark': don't propagated it, or fix the bug in update-mark.
2442    (defconst gnus-article-unpropagated-mark-lists
2443      '(seen cache download unsend score bookmark)
2444      "Marks that shouldn't be propagated to back ends.
2445    Typical marks are those that make no sense in a standalone back end,
2446    such as a mark that says whether an article is stored in the cache
2447    \(which doesn't make sense in a standalone back end).")
2448    
2449  (defvar gnus-headers-retrieved-by nil)  (defvar gnus-headers-retrieved-by nil)
2450  (defvar gnus-article-reply nil)  (defvar gnus-article-reply nil)
# Line 1585  If nil, no default charset is assumed wh Line 2461  If nil, no default charset is assumed wh
2461    "The mail address of the Gnus maintainers.")    "The mail address of the Gnus maintainers.")
2462    
2463  (defvar gnus-info-nodes  (defvar gnus-info-nodes
2464    '((gnus-group-mode "(gnus)The Group Buffer")    '((gnus-group-mode "(gnus)Group Buffer")
2465      (gnus-summary-mode "(gnus)The Summary Buffer")      (gnus-summary-mode "(gnus)Summary Buffer")
2466      (gnus-article-mode "(gnus)The Article Buffer")      (gnus-article-mode "(gnus)Article Buffer")
2467      (gnus-server-mode "(gnus)The Server Buffer")      (gnus-server-mode "(gnus)Server Buffer")
2468      (gnus-browse-mode "(gnus)Browse Foreign Server")      (gnus-browse-mode "(gnus)Browse Foreign Server")
2469      (gnus-tree-mode "(gnus)Tree Display"))      (gnus-tree-mode "(gnus)Tree Display"))
2470    "Alist of major modes and related Info nodes.")    "Alist of major modes and related Info nodes.")
# Line 1615  If nil, no default charset is assumed wh Line 2491  If nil, no default charset is assumed wh
2491    
2492  (defvar gnus-newsrc-alist nil  (defvar gnus-newsrc-alist nil
2493    "Assoc list of read articles.    "Assoc list of read articles.
2494  gnus-newsrc-hashtb should be kept so that both hold the same information.")  `gnus-newsrc-hashtb' should be kept so that both hold the same information.")
2495    
2496    (defvar gnus-registry-alist nil
2497      "Assoc list of registry data.
2498    gnus-registry.el will populate this if it's loaded.")
2499    
2500  (defvar gnus-newsrc-hashtb nil  (defvar gnus-newsrc-hashtb nil
2501    "Hashtable of gnus-newsrc-alist.")    "Hashtable of `gnus-newsrc-alist'.")
2502    
2503  (defvar gnus-killed-list nil  (defvar gnus-killed-list nil
2504    "List of killed newsgroups.")    "List of killed newsgroups.")
2505    
2506  (defvar gnus-killed-hashtb nil  (defvar gnus-killed-hashtb nil
2507    "Hash table equivalent of gnus-killed-list.")    "Hash table equivalent of `gnus-killed-list'.")
2508    
2509  (defvar gnus-zombie-list nil  (defvar gnus-zombie-list nil
2510    "List of almost dead newsgroups.")    "List of almost dead newsgroups.")
# Line 1654  gnus-newsrc-hashtb should be kept so tha Line 2534  gnus-newsrc-hashtb should be kept so tha
2534  (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"  (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
2535    "Regexp matching invalid groups.")    "Regexp matching invalid groups.")
2536    
2537    (defvar gnus-other-frame-object nil
2538      "A frame object which will be created by `gnus-other-frame'.")
2539    
2540  ;;; End of variables.  ;;; End of variables.
2541    
2542  ;; Define some autoload functions Gnus might use.  ;; Define some autoload functions Gnus might use.
# Line 1704  gnus-newsrc-hashtb should be kept so tha Line 2587  gnus-newsrc-hashtb should be kept so tha
2587        gnus-demon-remove-handler)        gnus-demon-remove-handler)
2588       ("gnus-demon" :interactive t       ("gnus-demon" :interactive t
2589        gnus-demon-init gnus-demon-cancel)        gnus-demon-init gnus-demon-cancel)
2590         ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from
2591          gnus-convert-image-to-gray-x-face gnus-convert-face-to-png
2592          gnus-face-from-file)
2593       ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree       ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
2594        gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)        gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)
2595       ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close       ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close
# Line 1762  gnus-newsrc-hashtb should be kept so tha Line 2648  gnus-newsrc-hashtb should be kept so tha
2648       ("gnus-msg" (gnus-summary-send-map keymap)       ("gnus-msg" (gnus-summary-send-map keymap)
2649        gnus-article-mail gnus-copy-article-buffer gnus-extended-version)        gnus-article-mail gnus-copy-article-buffer gnus-extended-version)
2650       ("gnus-msg" :interactive t       ("gnus-msg" :interactive t
2651        gnus-group-post-news gnus-group-mail gnus-summary-post-news        gnus-group-post-news gnus-group-mail gnus-group-news
2652          gnus-summary-post-news gnus-summary-news-other-window
2653        gnus-summary-followup gnus-summary-followup-with-original        gnus-summary-followup gnus-summary-followup-with-original
2654        gnus-summary-cancel-article gnus-summary-supersede-article        gnus-summary-cancel-article gnus-summary-supersede-article
2655        gnus-post-news gnus-summary-reply gnus-summary-reply-with-original        gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
# Line 1773  gnus-newsrc-hashtb should be kept so tha Line 2660  gnus-newsrc-hashtb should be kept so tha
2660        gnus-summary-wide-reply-with-original        gnus-summary-wide-reply-with-original
2661        gnus-summary-post-forward gnus-summary-wide-reply-with-original        gnus-summary-post-forward gnus-summary-wide-reply-with-original
2662        gnus-summary-post-forward)        gnus-summary-post-forward)
2663       ("gnus-picon" :interactive t gnus-article-display-picons       ("gnus-picon" :interactive t gnus-treat-from-picon)
       gnus-group-display-picons gnus-picons-article-display-x-face  
       gnus-picons-display-x-face)  
      ("gnus-picon" gnus-picons-buffer-name)  
2664       ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p       ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p
2665        gnus-grouplens-mode)        gnus-grouplens-mode)
2666       ("smiley" :interactive t gnus-smiley-display)       ("smiley" :interactive t smiley-region)
2667       ("gnus-win" gnus-configure-windows gnus-add-configuration)       ("gnus-win" gnus-configure-windows gnus-add-configuration)
2668       ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group       ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
2669        gnus-list-of-unread-articles gnus-list-of-read-articles        gnus-list-of-unread-articles gnus-list-of-read-articles
# Line 1809  gnus-newsrc-hashtb should be kept so tha Line 2693  gnus-newsrc-hashtb should be kept so tha
2693        gnus-article-de-base64-unreadable        gnus-article-de-base64-unreadable
2694        gnus-article-decode-HZ        gnus-article-decode-HZ
2695        gnus-article-wash-html        gnus-article-wash-html
2696        gnus-article-hide-pgp        gnus-article-unsplit-urls
2697        gnus-article-hide-pem gnus-article-hide-signature        gnus-article-hide-pem gnus-article-hide-signature
2698        gnus-article-strip-leading-blank-lines gnus-article-date-local        gnus-article-strip-leading-blank-lines gnus-article-date-local
2699        gnus-article-date-original gnus-article-date-lapsed        gnus-article-date-original gnus-article-date-lapsed
2700        gnus-article-show-all-headers  ;;      gnus-article-show-all-headers
2701        gnus-article-edit-mode gnus-article-edit-article        gnus-article-edit-mode gnus-article-edit-article
2702        gnus-article-edit-done gnus-article-decode-encoded-words        gnus-article-edit-done gnus-article-decode-encoded-words
2703        gnus-start-date-timer gnus-stop-date-timer        gnus-start-date-timer gnus-stop-date-timer
# Line 1835  gnus-newsrc-hashtb should be kept so tha Line 2719  gnus-newsrc-hashtb should be kept so tha
2719       ("gnus-agent" gnus-open-agent gnus-agent-get-function       ("gnus-agent" gnus-open-agent gnus-agent-get-function
2720        gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p        gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p
2721        gnus-agent-get-undownloaded-list gnus-agent-fetch-session        gnus-agent-get-undownloaded-list gnus-agent-fetch-session
2722        gnus-summary-set-agent-mark gnus-agent-save-group-info)        gnus-summary-set-agent-mark gnus-agent-save-group-info
2723          gnus-agent-request-article gnus-agent-retrieve-headers)
2724       ("gnus-agent" :interactive t       ("gnus-agent" :interactive t
2725        gnus-unplugged gnus-agentize gnus-agent-batch)        gnus-unplugged gnus-agentize gnus-agent-batch)
2726       ("gnus-vm" :interactive t gnus-summary-save-in-vm       ("gnus-vm" :interactive t gnus-summary-save-in-vm
2727        gnus-summary-save-article-vm)        gnus-summary-save-article-vm)
2728       ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-drafts)       ("compface" uncompface)
2729         ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
2730       ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)       ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
2731       ("gnus-mlspl" :interactive t gnus-group-split-setup       ("gnus-mlspl" :interactive t gnus-group-split-setup
2732        gnus-group-split-update))))        gnus-group-split-update)
2733         ("gnus-delay" gnus-delay-initialize))))
2734    
2735  ;;; gnus-sum.el thingies  ;;; gnus-sum.el thingies
2736    
2737    
2738  (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n"  (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
2739    "*The format specification of the lines in the summary buffer.    "*The format specification of the lines in the summary buffer.
2740    
2741  It works along the same lines as a normal formatting string,  It works along the same lines as a normal formatting string,
# Line 1865  with some simple extensions. Line 2752  with some simple extensions.
2752  %x   Contents of the Xref: header (string)  %x   Contents of the Xref: header (string)
2753  %D   Date of the article (string)  %D   Date of the article (string)
2754  %d   Date of the article (string) in DD-MMM format  %d   Date of the article (string) in DD-MMM format
2755    %o   Date of the article (string) in YYYYMMDD`T'HHMMSS format
2756  %M   Message-id of the article (string)  %M   Message-id of the article (string)
2757  %r   References of the article (string)  %r   References of the article (string)
2758  %c   Number of characters in the article (integer)  %c   Number of characters in the article (integer)
2759    %k   Pretty-printed version of the above (string)
2760         For example, \"1.2k\" or \"0.4M\".
2761  %L   Number of lines in the article (integer)  %L   Number of lines in the article (integer)
2762  %I   Indentation based on thread level (a string of spaces)  %I   Indentation based on thread level (a string of spaces)
2763    %B   A complex trn-style thread tree (string)
2764         The variables `gnus-sum-thread-*' can be used for customization.
2765  %T   A string with two possible values: 80 spaces if the article  %T   A string with two possible values: 80 spaces if the article
2766       is on thread level two or larger and 0 spaces on level one       is on thread level two or larger and 0 spaces on level one
2767  %R   \"A\" if this article has been replied to, \" \" otherwise (character)  %R   \"A\" if this article has been replied to, \" \" otherwise (character)
# Line 1886  with some simple extensions. Line 2778  with some simple extensions.
2778  %V   Total thread score (number).  %V   Total thread score (number).
2779  %P   The line number (number).  %P   The line number (number).
2780  %O   Download mark (character).  %O   Download mark (character).
2781    %*   If present, indicates desired cursor position
2782         (instead of after first colon).
2783  %u   User defined specifier.  The next character in the format string should  %u   User defined specifier.  The next character in the format string should
2784       be a letter.  Gnus will call the function gnus-user-format-function-X,       be a letter.  Gnus will call the function gnus-user-format-function-X,
2785       where X is the letter following %u.  The function will be passed the       where X is the letter following %u.  The function will be passed the
# Line 1893  with some simple extensions. Line 2787  with some simple extensions.
2787       will be inserted into the summary just like information from any other       will be inserted into the summary just like information from any other
2788       summary specifier.       summary specifier.
2789    
 Text between %( and %) will be highlighted with `gnus-mouse-face'  
 when the mouse point is placed inside the area.  There can only be one  
 such area.  
   
2790  The %U (status), %R (replied) and %z (zcore) specs have to be handled  The %U (status), %R (replied) and %z (zcore) specs have to be handled
2791  with care.  For reasons of efficiency, Gnus will compute what column  with care.  For reasons of efficiency, Gnus will compute what column
2792  these characters will end up in, and \"hard-code\" that.  This means that  these characters will end up in, and \"hard-code\" that.  This means that
# Line 1904  it is invalid to have these specs after Line 2794  it is invalid to have these specs after
2794  you might not be arrested, but your summary buffer will look strange,  you might not be arrested, but your summary buffer will look strange,
2795  which is bad enough.  which is bad enough.
2796    
2797  The smart choice is to have these specs as for to the left as  The smart choice is to have these specs as far to the left as
2798  possible.  possible.
2799    
2800  This restriction may disappear in later versions of Gnus."  This restriction may disappear in later versions of Gnus.
2801    
2802    General format specifiers can also be used.
2803    See Info node `(gnus)Formatting Variables'."
2804      :link '(custom-manual "(gnus)Formatting Variables")
2805    :type 'string    :type 'string
2806    :group 'gnus-summary-format)    :group 'gnus-summary-format)
2807    
# Line 1951  This restriction may disappear in later Line 2845  This restriction may disappear in later
2845    "Get hash value of STRING in HASHTABLE."    "Get hash value of STRING in HASHTABLE."
2846    `(symbol-value (intern-soft ,string ,hashtable)))    `(symbol-value (intern-soft ,string ,hashtable)))
2847    
2848    (defmacro gnus-gethash-safe (string hashtable)
2849      "Get hash value of STRING in HASHTABLE.
2850    Return nil if not defined."
2851      `(let ((sym (intern-soft ,string ,hashtable)))
2852         (and (boundp sym) (symbol-value sym))))
2853    
2854  (defmacro gnus-sethash (string value hashtable)  (defmacro gnus-sethash (string value hashtable)
2855    "Set hash value.  Arguments are STRING, VALUE, and HASHTABLE."    "Set hash value.  Arguments are STRING, VALUE, and HASHTABLE."
2856    `(set (intern ,string ,hashtable) ,value))    `(set (intern ,string ,hashtable) ,value))
# Line 2036  This restriction may disappear in later Line 2936  This restriction may disappear in later
2936  (defmacro gnus-get-info (group)  (defmacro gnus-get-info (group)
2937    `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))    `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
2938    
 ;; Byte-compiler warning.  
 (defvar gnus-visual)  
 ;; Find out whether the gnus-visual TYPE is wanted.  
 (defun gnus-visual-p (&optional type class)  
   (and gnus-visual                      ; Has to be non-nil, at least.  
        (if (not type)                   ; We don't care about type.  
            gnus-visual  
          (if (listp gnus-visual)        ; It's a list, so we check it.  
              (or (memq type gnus-visual)  
                  (memq class gnus-visual))  
            t))))  
   
2939  ;;; Load the compatibility functions.  ;;; Load the compatibility functions.
2940    
2941  (require 'gnus-ems)  (require 'gnus-ems)
# Line 2076  This restriction may disappear in later Line 2964  This restriction may disappear in later
2964  ;;; Gnus Utility Functions  ;;; Gnus Utility Functions
2965  ;;;  ;;;
2966    
2967    (defun gnus-find-subscribed-addresses ()
2968      "Return a regexp matching the addresses of all subscribed mail groups.
2969    It consists of the `to-address' or `to-list' parameter of all groups
2970    with a `subscribed' parameter."
2971      (let (group address addresses)
2972        (dolist (entry (cdr gnus-newsrc-alist))
2973          (setq group (car entry))
2974          (when (gnus-parameter-subscribed group)
2975            (setq address (mail-strip-quoted-names
2976                           (or (gnus-group-fast-parameter group 'to-address)
2977                               (gnus-group-fast-parameter group 'to-list))))
2978            (when address
2979              (add-to-list 'addresses address))))
2980        (when addresses
2981          (list (mapconcat 'regexp-quote addresses "\\|")))))
2982    
2983  (defmacro gnus-string-or (&rest strings)  (defmacro gnus-string-or (&rest strings)
2984    "Return the first element of STRINGS that is a non-blank string.    "Return the first element of STRINGS that is a non-blank string.
# Line 2099  If ARG, insert string at point." Line 3002  If ARG, insert string at point."
3002        (insert (message gnus-version))        (insert (message gnus-version))
3003      (message gnus-version)))      (message gnus-version)))
3004    
3005  (defun gnus-continuum-version (version)  (defun gnus-continuum-version (&optional version)
3006    "Return VERSION as a floating point number."    "Return VERSION as a floating point number."
3007      (interactive)
3008      (unless version
3009        (setq version gnus-version))
3010    (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)    (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
3011              (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))              (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))
3012      (let ((alpha (and (match-beginning 1) (match-string 1 version)))      (let ((alpha (and (match-beginning 1) (match-string 1 version)))
# Line 2116  If ARG, insert string at point." Line 3022  If ARG, insert string at point."
3022                      0))                      0))
3023        (string-to-number        (string-to-number
3024         (if (zerop major)         (if (zerop major)
3025             (format "%s00%02d%02d"               (format "%s00%02d%02d"
3026                     (if (member alpha '("(ding)" "d"))                       (if (member alpha '("(ding)" "d"))
3027                         "4.99"                           "4.99"
3028                       (+ 5 (* 0.02                         (+ 5 (* 0.02
3029                               (abs                                 (abs
3030                                (- (mm-char-int (aref (downcase alpha) 0))                                  (- (mm-char-int (aref (downcase alpha) 0))
3031                                   (mm-char-int ?t))))                                     (mm-char-int ?t))))
3032                          -0.01))                            -0.01))
3033                     minor least)                       minor least)
3034           (format "%d.%02d%02d" major minor least))))))           (format "%d.%02d%02d" major minor least))))))
3035    
3036  (defun gnus-info-find-node ()  (defun gnus-info-find-node (&optional nodename)
3037    "Find Info documentation of Gnus."    "Find Info documentation of Gnus."
3038    (interactive)    (interactive)
3039    ;; Enlarge info window if needed.    ;; Enlarge info window if needed.
3040    (let (gnus-info-buffer)    (let (gnus-info-buffer)
3041      (Info-goto-node (cadr (assq major-mode gnus-info-nodes)))      (Info-goto-node (or nodename (cadr (assq major-mode gnus-info-nodes))))
3042      (setq gnus-info-buffer (current-buffer))      (setq gnus-info-buffer (current-buffer))
3043      (gnus-configure-windows 'info)))      (gnus-configure-windows 'info)))
3044    
# Line 2274  that that variable is buffer-local to th Line 3180  that that variable is buffer-local to th
3180    (let ((group (or group gnus-newsgroup-name)))    (let ((group (or group gnus-newsgroup-name)))
3181      (not (gnus-check-backend-function 'request-replace-article group))))      (not (gnus-check-backend-function 'request-replace-article group))))
3182    
 (defun gnus-group-total-expirable-p (group)  
   "Check whether GROUP is total-expirable or not."  
   (let ((params (gnus-group-find-parameter group))  
         val)  
     (cond  
      ((memq 'total-expire params)  
       t)  
      ((setq val (assq 'total-expire params)) ; (auto-expire . t)  
       (cdr val))  
      (gnus-total-expirable-newsgroups   ; Check var.  
       (string-match gnus-total-expirable-newsgroups group)))))  
   
 (defun gnus-group-auto-expirable-p (group)  
   "Check whether GROUP is auto-expirable or not."  
   (let ((params (gnus-group-find-parameter group))  
         val)  
     (cond  
      ((memq 'auto-expire params)  
       t)  
      ((setq val (assq 'auto-expire params)) ; (auto-expire . t)  
       (cdr val))  
      (gnus-auto-expirable-newsgroups    ; Check var.  
       (string-match gnus-auto-expirable-newsgroups group)))))  
   
3183  (defun gnus-virtual-group-p (group)  (defun gnus-virtual-group-p (group)
3184    "Say whether GROUP is virtual or not."    "Say whether GROUP is virtual or not."
3185    (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))    (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))
# Line 2305  that that variable is buffer-local to th Line 3187  that that variable is buffer-local to th
3187    
3188  (defun gnus-news-group-p (group &optional article)  (defun gnus-news-group-p (group &optional article)
3189    "Return non-nil if GROUP (and ARTICLE) come from a news server."    "Return non-nil if GROUP (and ARTICLE) come from a news server."
3190    (or (gnus-member-of-valid 'post group) ; Ordinary news group.    (cond ((gnus-member-of-valid 'post group) ;Ordinary news group
3191        (and (gnus-member-of-valid 'post-mail group) ; Combined group.           t)                             ;is news of course.
3192             (if (or (null article)          ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined.
3193                     (not (< article 0)))           nil)                           ;must be mail then.
3194                 (eq (gnus-request-type group article) 'news)          ((vectorp article)              ;Has header info.
3195               (if (not (vectorp article))           (eq (gnus-request-type group (mail-header-id article)) 'news))
3196                   nil          ((null article)                 ;Hasn't header info
3197                 ;; It's a real article.           (eq (gnus-request-type group) 'news)) ;(unknown ==> mail)
3198                 (eq (gnus-request-type group (mail-header-id article))          ((< article 0)                  ;Virtual message
3199                     'news))))))           nil)                           ;we don't know, guess mail.
3200            (t                              ;Has positive number
3201             (eq (gnus-request-type group article) 'news)))) ;use it.
3202    
3203  ;; Returns a list of writable groups.  ;; Returns a list of writable groups.
3204  (defun gnus-writable-groups ()  (defun gnus-writable-groups ()
# Line 2376  that that variable is buffer-local to th Line 3260  that that variable is buffer-local to th
3260                                     (nth 1 method))))                                     (nth 1 method))))
3261        method)))        method)))
3262    
3263    (defsubst gnus-server-to-method (server)
3264      "Map virtual server names to select methods."
3265      (or (and server (listp server) server)
3266          (cdr (assoc server gnus-server-method-cache))
3267          (let ((result
3268                 (or
3269                  ;; Perhaps this is the native server?
3270                  (and (equal server "native") gnus-select-method)
3271                  ;; It should be in the server alist.
3272                  (cdr (assoc server gnus-server-alist))
3273                  ;; It could be in the predefined server alist.
3274                  (cdr (assoc server gnus-predefined-server-alist))
3275                  ;; If not, we look through all the opened server
3276                  ;; to see whether we can find it there.
3277                  (let ((opened gnus-opened-servers))
3278                    (while (and opened
3279                                (not (equal server (format "%s:%s" (caaar opened)
3280                                                           (cadaar opened)))))
3281                      (pop opened))
3282                    (caar opened))
3283                  ;; It could be a named method, search all servers
3284                  (let ((servers gnus-secondary-select-methods))
3285                    (while (and servers
3286                                (not (equal server (format "%s:%s" (caar servers)
3287                                                           (cadar servers)))))
3288                      (pop servers))
3289                    (car servers))
3290                  ;; This could be some sort of foreign server that I
3291                  ;; simply haven't opened (yet).  Do a brute-force scan
3292                  ;; of the entire gnus-newsrc-alist for the server name
3293                  ;; of every method.  As a side-effect, loads the
3294                  ;; gnus-server-method-cache so this only happens once,
3295                  ;; if at all.
3296                  (let (match)
3297                    (mapcar
3298                     (lambda (info)
3299                       (let ((info-method (gnus-info-method info)))
3300                         (unless (stringp info-method)
3301                           (let ((info-server (gnus-method-to-server info-method)))
3302                             (when (equal server info-server)
3303                               (setq match info-method))))))
3304                     (cdr gnus-newsrc-alist))
3305                    match))))
3306            (when result
3307              (push (cons server result) gnus-server-method-cache))
3308            result)))
3309    
3310    (defsubst gnus-method-to-server (method)
3311      (catch 'server-name
3312        (setq method (or method gnus-select-method))
3313    
3314        ;; Perhaps it is already in the cache.
3315        (mapc (lambda (name-method)
3316                (if (equal (cdr name-method) method)
3317                    (throw 'server-name (car name-method))))
3318              gnus-server-method-cache)
3319    
3320        (mapc
3321         (lambda (server-alist)
3322           (mapc (lambda (name-method)
3323                   (when (gnus-methods-equal-p (cdr name-method) method)
3324                     (unless (member name-method gnus-server-method-cache)
3325                       (push name-method gnus-server-method-cache))
3326                     (throw 'server-name (car name-method))))
3327                 server-alist))
3328         (let ((alists (list gnus-server-alist
3329                             gnus-predefined-server-alist)))
3330           (if gnus-select-method
3331               (push (list (cons "native" gnus-select-method)) alists))
3332           alists))
3333    
3334        (let* ((name (if (member (cadr method) '(nil ""))
3335                         (format "%s" (car method))
3336                       (format "%s:%s" (car method) (cadr method))))
3337               (name-method (cons name method)))
3338          (unless (member name-method gnus-server-method-cache)
3339            (push name-method gnus-server-method-cache))
3340          name)))
3341    
3342  (defsubst gnus-server-get-method (group method)  (defsubst gnus-server-get-method (group method)
3343    ;; Input either a server name, and extended server name, or a    ;; Input either a server name, and extended server name, or a
3344    ;; select method, and return a select method.    ;; select method, and return a select method.
# Line 2393  that that variable is buffer-local to th Line 3356  that that variable is buffer-local to th
3356          (t          (t
3357           (gnus-server-add-address method))))           (gnus-server-add-address method))))
3358    
 (defun gnus-server-to-method (server)  
   "Map virtual server names to select methods."  
   (or  
    ;; Is this a method, perhaps?  
    (and server (listp server) server)  
    ;; Perhaps this is the native server?  
    (and (equal server "native") gnus-select-method)  
    ;; It should be in the server alist.  
    (cdr (assoc server gnus-server-alist))  
    ;; It could be in the predefined server alist.  
    (cdr (assoc server gnus-predefined-server-alist))  
    ;; If not, we look through all the opened server  
    ;; to see whether we can find it there.  
    (let ((opened gnus-opened-servers))  
      (while (and opened  
                  (not (equal server (format "%s:%s" (caaar opened)  
                                             (cadaar opened)))))  
        (pop opened))  
      (caar opened))  
    ;; It could be a named method, search all servers  
    (let ((servers gnus-secondary-select-methods))  
      (while (and servers  
                  (not (equal server (format "%s:%s" (caar servers)  
                                             (cadar servers)))))  
        (pop servers))  
      (car servers))))  
   
3359  (defmacro gnus-method-equal (ss1 ss2)  (defmacro gnus-method-equal (ss1 ss2)
3360    "Say whether two servers are equal."    "Say whether two servers are equal."
3361    `(let ((s1 ,ss1)    `(let ((s1 ,ss1)
# Line 2474  that that variable is buffer-local to th Line 3410  that that variable is buffer-local to th
3410        (and active        (and active
3411             (file-exists-p active))))))             (file-exists-p active))))))
3412    
3413  (defun gnus-group-prefixed-name (group method)  (defsubst gnus-method-to-server-name (method)
3414    "Return the whole name from GROUP and METHOD."    (concat
3415    (and (stringp method) (setq method (gnus-server-to-method method)))     (format "%s" (car method))
3416       (when (and
3417              (or (assoc (format "%s" (car method))
3418                         (gnus-methods-using 'address))
3419                  (gnus-server-equal method gnus-message-archive-method))
3420              (nth 1 method)
3421              (not (string= (nth 1 method) "")))
3422         (concat "+" (nth 1 method)))))
3423    
3424    (defsubst gnus-method-to-full-server-name (method)
3425      (format "%s+%s" (car method) (nth 1 method)))
3426    
3427    (defun gnus-group-prefixed-name (group method &optional full)
3428      "Return the whole name from GROUP and METHOD.
3429    Call with full set to get the fully qualified group name (even if the
3430    server is native)."
3431      (when (stringp method)
3432        (setq method (gnus-server-to-method method)))
3433    (if (or (not method)    (if (or (not method)
3434            (gnus-server-equal method "native"))            (and (not full) (gnus-server-equal method "native"))
3435              ;;;!!! This might not be right.  We'll see...
3436              ;(string-match ":" group)
3437              )
3438          group
3439        (concat (gnus-method-to-server-name method) ":" group)))
3440    
3441    (defun gnus-group-guess-prefixed-name (group)
3442      "Guess the whole name from GROUP and METHOD."
3443      (gnus-group-prefixed-name group (gnus-find-method-for-group
3444                                   group)))
3445    
3446    (defun gnus-group-full-name (group method)
3447      "Return the full name from GROUP and METHOD, even if the method is native."
3448      (gnus-group-prefixed-name group method t))
3449    
3450    (defun gnus-group-guess-full-name (group)
3451      "Guess the full name from GROUP, even if the method is native."
3452      (if (gnus-group-prefixed-p group)
3453          group
3454        (gnus-group-full-name group (gnus-find-method-for-group group))))
3455    
3456    (defun gnus-group-guess-full-name-from-command-method (group)
3457      "Guess the full name from GROUP, even if the method is native."
3458      (if (gnus-group-prefixed-p group)
3459        group        group
3460      (concat (format "%s" (car method))      (gnus-group-full-name group gnus-command-method)))
             (when (and  
                    (or (assoc (format "%s" (car method))  
                               (gnus-methods-using 'address))  
                        (gnus-server-equal method gnus-message-archive-method))  
                    (nth 1 method)  
                    (not (string= (nth 1 method) "")))  
               (concat "+" (nth 1 method)))  
             ":" group)))  
3461    
3462  (defun gnus-group-real-prefix (group)  (defun gnus-group-real-prefix (group)
3463    "Return the prefix of the current group name."    "Return the prefix of the current group name."
3464    (if (string-match "^[^:]+:" group)    (if (stringp group)
3465        (substring group 0 (match-end 0))        (if (string-match "^[^:]+:" group)
3466      ""))            (substring group 0 (match-end 0))
3467            "")
3468        nil))
3469    
3470    (defun gnus-group-short-name (group)
3471      "Return the short group name."
3472      (let ((prefix (gnus-group-real-prefix group)))
3473        (if (< 0 (length prefix))
3474            (substring group (length prefix) nil)
3475          group)))
3476    
3477    (defun gnus-group-prefixed-p (group)
3478      "Return the prefix of the current group name."
3479      (< 0 (length (gnus-group-real-prefix group))))
3480    
3481    (defun gnus-summary-buffer-name (group)
3482      "Return the summary buffer name of GROUP."
3483      (concat "*Summary " (gnus-group-decoded-name group) "*"))
3484    
3485  (defun gnus-group-method (group)  (defun gnus-group-method (group)
3486    "Return the server or method used for selecting GROUP.    "Return the server or method used for selecting GROUP.
# Line 2528  You should probably use `gnus-find-metho Line 3514  You should probably use `gnus-find-metho
3514  (defsubst gnus-secondary-method-p (method)  (defsubst gnus-secondary-method-p (method)
3515    "Return whether METHOD is a secondary select method."    "Return whether METHOD is a secondary select method."
3516    (let ((methods gnus-secondary-select-methods)    (let ((methods gnus-secondary-select-methods)
3517          (gmethod (gnus-server-get-method nil method)))          (gmethod (inline (gnus-server-get-method nil method))))
3518      (while (and methods      (while (and methods
3519                  (not (gnus-method-equal                  (not (gnus-method-equal
3520                        (gnus-server-get-method nil (car methods))                        (inline (gnus-server-get-method nil (car methods)))
3521                        gmethod)))                        gmethod)))
3522        (setq methods (cdr methods)))        (setq methods (cdr methods)))
3523      methods))      methods))
# Line 2569  You should probably use `gnus-find-metho Line 3555  You should probably use `gnus-find-metho
3555    "Say whether the group is secondary or not."    "Say whether the group is secondary or not."
3556    (gnus-secondary-method-p (gnus-find-method-for-group group)))    (gnus-secondary-method-p (gnus-find-method-for-group group)))
3557    
3558    (defun gnus-parameters-get-parameter (group)
3559      "Return the group parameters for GROUP from `gnus-parameters'."
3560      (let (params-list)
3561        (dolist (elem gnus-parameters)
3562          (when (string-match (car elem) group)
3563            (setq params-list
3564                  (nconc (gnus-expand-group-parameters
3565                          (car elem) (cdr elem) group)
3566                         params-list))))
3567        params-list))
3568    
3569    (defun gnus-expand-group-parameter (match value group)
3570      "Use MATCH to expand VALUE in GROUP."
3571      (with-temp-buffer
3572        (insert group)
3573        (goto-char (point-min))
3574        (while (re-search-forward match nil t)
3575          (replace-match value))
3576        (buffer-string)))
3577    
3578    (defun gnus-expand-group-parameters (match parameters group)
3579      "Go through PARAMETERS and expand them according to the match data."
3580      (let (new)
3581        (dolist (elem parameters)
3582          (if (and (stringp (cdr elem))
3583                   (string-match "\\\\[0-9&]" (cdr elem)))
3584              (push (cons (car elem)
3585                          (gnus-expand-group-parameter match (cdr elem) group))
3586                    new)
3587            (push elem new)))
3588        new))
3589    
3590    (defun gnus-group-fast-parameter (group symbol &optional allow-list)
3591      "For GROUP, return the value of SYMBOL.
3592    
3593    You should call this in the `gnus-group-buffer' buffer.
3594    The function `gnus-group-find-parameter' will do that for you."
3595      ;; The speed trick:  No cons'ing and quit early.
3596      (let* ((params (funcall gnus-group-get-parameter-function group))
3597             ;; Start easy, check the "real" group parameters.
3598             (simple-results
3599              (gnus-group-parameter-value params symbol allow-list t)))
3600        (if simple-results
3601            ;; Found results; return them.
3602            (car simple-results)
3603          ;; We didn't found it there, try `gnus-parameters'.
3604          (let ((result nil)
3605                (head nil)
3606                (tail gnus-parameters))
3607            ;; A good old-fashioned non-cl loop.
3608            (while tail
3609              (setq head (car tail)
3610                    tail (cdr tail))
3611              ;; The car is regexp matching for matching the group name.
3612              (when (string-match (car head) group)
3613                ;; The cdr is the parameters.
3614                (setq result (gnus-group-parameter-value (cdr head)
3615                                                         symbol allow-list))
3616                (when result
3617                  ;; Expand if necessary.
3618                  (if (and (stringp result) (string-match "\\\\[0-9&]" result))
3619                      (setq result (gnus-expand-group-parameter (car head)
3620                                                                result group)))
3621                  ;; Exit the loop early.
3622                  (setq tail nil))))
3623            ;; Done.
3624            result))))
3625    
3626  (defun gnus-group-find-parameter (group &optional symbol allow-list)  (defun gnus-group-find-parameter (group &optional symbol allow-list)
3627    "Return the group parameters for GROUP.    "Return the group parameters for GROUP.
3628  If SYMBOL, return the value of that symbol in the group parameters."  If SYMBOL, return the value of that symbol in the group parameters.
3629    
3630    If you call this function inside a loop, consider using the faster
3631    `gnus-group-fast-parameter' instead."
3632    (save-excursion    (save-excursion
3633      (set-buffer gnus-group-buffer)      (set-buffer gnus-group-buffer)
3634      (let ((parameters (funcall gnus-group-get-parameter-function group)))      (if symbol
3635        (if symbol          (gnus-group-fast-parameter group symbol allow-list)
3636            (gnus-group-parameter-value parameters symbol allow-list)        (nconc
3637          parameters))))         (copy-sequence
3638            (funcall gnus-group-get-parameter-function group))
3639           (gnus-parameters-get-parameter group)))))
3640    
3641  (defun gnus-group-get-parameter (group &optional symbol allow-list)  (defun gnus-group-get-parameter (group &optional symbol allow-list)
3642    "Return the group parameters for GROUP.    "Return the group parameters for GROUP.
# Line 2589  also examines the topic parameters." Line 3648  also examines the topic parameters."
3648          (gnus-group-parameter-value params symbol allow-list)          (gnus-group-parameter-value params symbol allow-list)
3649        params)))        params)))
3650    
3651  (defun gnus-group-parameter-value (params symbol &optional allow-list)  (defun gnus-group-parameter-value (params symbol &optional
3652                                              allow-list present-p)
3653    "Return the value of SYMBOL in group PARAMS."    "Return the value of SYMBOL in group PARAMS."
3654    ;; We only wish to return group parameters (dotted lists) and    ;; We only wish to return group parameters (dotted lists) and
3655    ;; not local variables, which may have the same names.    ;; not local variables, which may have the same names.
# Line 2603  also examines the topic parameters." Line 3663  also examines the topic parameters."
3663                         (eq (car elem) symbol)                         (eq (car elem) symbol)
3664                         (or allow-list                         (or allow-list
3665                             (atom (cdr elem))))                             (atom (cdr elem))))
3666                (throw 'found (cdr elem))))))))                (throw 'found (if present-p (list (cdr elem))
3667                                  (cdr elem)))))))))
3668    
3669  (defun gnus-group-add-parameter (group param)  (defun gnus-group-add-parameter (group param)
3670    "Add parameter PARAM to GROUP."    "Add parameter PARAM to GROUP."
# Line 2662  just the host name." Line 3723  just the host name."
3723                                 depth (+ depth 1)))                                 depth (+ depth 1)))
3724                         depth))))                         depth))))
3725      ;; Separate foreign select method from group name and collapse.      ;; Separate foreign select method from group name and collapse.
3726      ;; If method contains a server, collapse to non-domain server name,     ;; If method contains a server, collapse to non-domain server name,
3727      ;; otherwise collapse to select method.      ;; otherwise collapse to select method.
3728      (let* ((colon (string-match ":" group))      (let* ((colon (string-match ":" group))
3729             (server (and colon (substring group 0 colon)))             (server (and colon (substring group 0 colon)))
# Line 2809  If NEWSGROUP is nil, return the global k Line 3870  If NEWSGROUP is nil, return the global k
3870            (list (intern server) "")))            (list (intern server) "")))
3871      gnus-select-method))      gnus-select-method))
3872    
3873    (defun gnus-server-string (server)
3874      "Return a readable string that describes SERVER."
3875      (let* ((server (gnus-server-to-method server))
3876             (address (nth 1 server)))
3877        (if (and address
3878                 (not (zerop (length address))))
3879            (format "%s using %s" address (car server))
3880          (format "%s" (car server)))))
3881    
3882  (defun gnus-find-method-for-group (group &optional info)  (defun gnus-find-method-for-group (group &optional info)
3883    "Find the select method that GROUP uses."    "Find the select method that GROUP uses."
3884    (or gnus-override-method    (or gnus-override-method
3885        (and (not group)        (and (not group)
3886             gnus-select-method)             gnus-select-method)
3887        (and (not (gnus-group-entry group));; a new group        (and (not (gnus-group-entry group)) ;; a new group
3888             (gnus-group-name-to-method group))             (gnus-group-name-to-method group))
3889        (let ((info (or info (gnus-get-info group)))        (let ((info (or info (gnus-get-info group)))
3890              method)              method)
# Line 2857  Disallow invalid group names." Line 3927  Disallow invalid group names."
3927               (setq group (read-string (concat prefix prompt)               (setq group (read-string (concat prefix prompt)
3928                                        (cons (or default "") 0)                                        (cons (or default "") 0)
3929                                        'gnus-group-history)))                                        'gnus-group-history)))
3930          (setq prefix (format "Invalid group name: \"%s\".  " group)          (let ((match (match-string 0 group)))
3931                group nil)))            ;; Might be okay (e.g. for nnimap), so ask the user:
3932              (unless (and (not (string-match "^$\\|:" match))
3933                           (message-y-or-n-p
3934                            "Proceed and create group anyway? " t
3935    "The group name \"" group "\" contains a forbidden character: \"" match "\".
3936    
3937    Usually, it's dangerous to create a group with this name, because it's not
3938    supported by all back ends and servers.  On IMAP servers it should work,
3939    though.  If you are really sure, you can proceed anyway and create the group.
3940    
3941    You may customize the variable `gnus-invalid-group-regexp', which currently is
3942    set to \"" gnus-invalid-group-regexp
3943    "\", if you want to get rid of this query permanently."))
3944                (setq prefix (format "Invalid group name: \"%s\".  " group)
3945                      group nil)))))
3946      group))      group))
3947    
3948  (defun gnus-read-method (prompt)  (defun gnus-read-method (prompt)
3949    "Prompt the user for a method.    "Prompt the user for a method.
3950  Allow completion over sensible values."  Allow completion over sensible values."
3951    (let* ((servers    (let* ((open-servers
3952            (append gnus-valid-select-methods            (mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
3953                    (mapcar (lambda (i) (list (format "%s:%s" (caar i)                    gnus-opened-servers))
3954                                                      (cadar i))))           (valid-methods
3955                            gnus-opened-servers)            (let (methods)
3956                (dolist (method gnus-valid-select-methods)
3957                  (if (or (memq 'prompt-address method)
3958                          (not (assoc (format "%s:" (car method)) open-servers)))
3959                      (push method methods)))
3960                methods))
3961             (servers
3962              (append valid-methods
3963                      open-servers
3964                    gnus-predefined-server-alist                    gnus-predefined-server-alist
3965                    gnus-server-alist))                    gnus-server-alist))
3966           (method           (method
# Line 2883  Allow completion over sensible values." Line 3975  Allow completion over sensible values."
3975                                 (assoc method gnus-valid-select-methods))                                 (assoc method gnus-valid-select-methods))
3976                           (read-string "Address: ")                           (read-string "Address: ")
3977                         "")))                         "")))
3978          (or (let ((opened gnus-opened-servers))          (or (cadr (assoc (format "%s:%s" method address) open-servers))
               (while (and opened  
                           (not (equal (format "%s:%s" method address)  
                                       (format "%s:%s" (caaar opened)  
                                               (cadaar opened)))))  
                 (pop opened))  
               (caar opened))  
3979              (list (intern method) address))))              (list (intern method) address))))
3980       ((assoc method servers)       ((assoc method servers)
3981        method)        method)
3982       (t       (t
3983        (list (intern method) "")))))        (list (intern method) "")))))
3984    
3985    ;;; Agent functions
3986    
3987    (defun gnus-agent-method-p (method)
3988      "Say whether METHOD is covered by the agent."
3989      (or (eq (car gnus-agent-method-p-cache) method)
3990          (setq gnus-agent-method-p-cache
3991                (cons method
3992                      (member (if (stringp method)
3993                                  method
3994                                (gnus-method-to-server method)) gnus-agent-covered-methods))))
3995      (cdr gnus-agent-method-p-cache))
3996    
3997    (defun gnus-online (method)
3998      (not
3999       (if gnus-plugged
4000           (eq (cadr (assoc method gnus-opened-servers)) 'offline)
4001         (gnus-agent-method-p method))))
4002    
4003  ;;; User-level commands.  ;;; User-level commands.
4004    
4005  ;;;###autoload  ;;;###autoload
4006  (defun gnus-slave-no-server (&optional arg)  (defun gnus-slave-no-server (&optional arg)
4007    "Read network news as a slave, without connecting to local server."    "Read network news as a slave, without connecting to the local server."
4008    (interactive "P")    (interactive "P")
4009    (gnus-no-server arg t))    (gnus-no-server arg t))
4010    
4011  ;;;###autoload  ;;;###autoload
4012  (defun gnus-no-server (&optional arg slave)  (defun gnus-no-server (&optional arg slave)
4013    "Read network news.    "Read network news.
4014  If ARG is a positive number, Gnus will use that as the  If ARG is a positive number, Gnus will use that as the startup
4015  startup level.  If ARG is nil, Gnus will be started at level 2.  level. If ARG is nil, Gnus will be started at level 2.  If ARG is
4016  If ARG is non-nil and not a positive number, Gnus will  non-nil and not a positive number, Gnus will prompt the user for the
4017  prompt the user for the name of an NNTP server to use.  name of an NNTP server to use.
4018  As opposed to `gnus', this command will not connect to the local server."  As opposed to `gnus', this command will not connect to the local
4019    server."
4020    (interactive "P")    (interactive "P")
4021    (gnus-no-server-1 arg slave))    (gnus-no-server-1 arg slave))
4022    
# Line 2922  As opposed to `gnus', this command will Line 4027  As opposed to `gnus', this command will
4027    (gnus arg nil 'slave))    (gnus arg nil 'slave))
4028    
4029  ;;;###autoload  ;;;###autoload
4030  (defun gnus-other-frame (&optional arg)  (defun gnus-other-frame (&optional arg display)
4031    "Pop up a frame to read news."    "Pop up a frame to read news.
4032    This will call one of the Gnus commands which is specified by the user
4033    option `gnus-other-frame-function' (default `gnus') with the argument
4034    ARG if Gnus is not running, otherwise just pop up a Gnus frame.  The
4035    optional second argument DISPLAY should be a standard display string
4036    such as \"unix:0\" to specify where to pop up a frame.  If DISPLAY is
4037    omitted or the function `make-frame-on-display' is not available, the
4038    current display is used."
4039    (interactive "P")    (interactive "P")
4040    (let ((window (get-buffer-window gnus-group-buffer)))    (if (fboundp 'make-frame-on-display)
4041      (cond (window        (unless display
4042             (select-frame (window-frame window)))          (setq display (gnus-frame-or-window-display-name (selected-frame))))
4043            (t      (setq display nil))
4044             (select-frame (make-frame)))))    (let ((alive (gnus-alive-p)))
4045    (gnus arg))      (unless (and alive
4046                     (catch 'found
4047                       (walk-windows
4048                        (lambda (window)
4049                          (when (and (or (not display)
4050                                         (equal display
4051                                                (gnus-frame-or-window-display-name
4052                                                 window)))
4053                                     (with-current-buffer (window-buffer window)
4054                                       (string-match "\\`gnus-"
4055                                                     (symbol-name major-mode))))
4056                            (gnus-select-frame-set-input-focus
4057                             (setq gnus-other-frame-object (window-frame window)))
4058                            (select-window window)
4059                            (throw 'found t)))
4060                        'ignore t)))
4061          (gnus-select-frame-set-input-focus
4062           (setq gnus-other-frame-object
4063                 (if display
4064                     (make-frame-on-display display gnus-other-frame-parameters)
4065                   (make-frame gnus-other-frame-parameters))))
4066          (if alive
4067              (switch-to-buffer gnus-group-buffer)
4068            (funcall gnus-other-frame-function arg)
4069            (add-hook 'gnus-exit-gnus-hook
4070                      '(lambda nil
4071                         (when (and (frame-live-p gnus-other-frame-object)
4072                                    (cdr (frame-list)))
4073                           (delete-frame gnus-other-frame-object))
4074                         (setq gnus-other-frame-object nil)))))))
4075    
4076  ;;(setq thing ?                         ; this is a comment  ;;(setq thing ?                         ; this is a comment
4077  ;;      more 'yes)  ;;      more 'yes)
# Line 2939  As opposed to `gnus', this command will Line 4080  As opposed to `gnus', this command will
4080  (defun gnus (&optional arg dont-connect slave)  (defun gnus (&optional arg dont-connect slave)
4081    "Read network news.    "Read network news.
4082  If ARG is non-nil and a positive number, Gnus will use that as the  If ARG is non-nil and a positive number, Gnus will use that as the
4083  startup level.  If ARG is non-nil and not a positive number, Gnus will  startup level.  If ARG is non-nil and not a positive number, Gnus will
4084  prompt the user for the name of an NNTP server to use."  prompt the user for the name of an NNTP server to use."
4085    (interactive "P")    (interactive "P")
4086      (unless (byte-code-function-p (symbol-function 'gnus))
4087        (message "You should byte-compile Gnus")
4088        (sit-for 2))
4089    (gnus-1 arg dont-connect slave))    (gnus-1 arg dont-connect slave))
4090    
4091  ;; Allow redefinition of Gnus functions.  ;; Allow redefinition of Gnus functions.

Legend:
Removed from v.1.23.4.2  
changed lines
  Added in v.1.23.4.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26